-2

This is a menu, click to enter the new page, The URL is placed in the href attribute,but in IE browser can not jump

In other browsers there is no problem.

<html>
 <head></head>
 <body>
  <a data-toggle="dropdown" href="#" class="a-l"> <img id="National_img_1" /> Menu <span class="caret"></span> </a> 
  <ul class="dropdown-menu" role="menu" id="National"> 
   <li><a href="Index_Action!getAll.action" class="lang-select">BB</a></li> 
   <li><a href="two_Action!getAll.action" class="lang-select">CC</a></li> 
   <li><a href="for_Action!getAll.action" class="lang-select">DD</a></li>
  </ul>
 </body>
</html>

I tried the following method:

  1. Add the button tag to <a>

    2.use <a href=“javascript:void(0)” onclick=“window.location.href='for_Action!getAll.action'>

Still can't jump to other pages.

The environment is in Internet explorer 8,To support it

JavaServer Pages technology

window.location.href not working on IE Invalid argument in IE 9, ASP.NET C#

3 Answers3

0

Make sure your IE version is compatible for HTML5 or not first You can use https://www.greasespot.net/. This is software which modifies loaded HTML pages

Some adaptations of it (of unknown quality) exist for IE11 :

GreasemonkIE TrixIE WPF4.5 beta Assuming that one of them works

0

why are you using javascript in a href attribute

try

var element = document.getElementsByClassName("class")[0];

element.addEventListener("click", function(event){
 window.location.href = "your_location"
});
David Clews
  • 795
  • 6
  • 14
-1

Try after adding file extension in href. Make sure your files exist in the same folder. I have tried after adding the extension of the target file and it is working fine.

Alok Mali
  • 2,821
  • 2
  • 16
  • 32