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:
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#
答案 0 :(得分:0)
请确保您的IE版本与HTML5兼容,否则请先确保 您可以使用https://www.greasespot.net/。这是修改加载的HTML页面的软件
对于IE11,存在一些它的改编(质量未知):
GreasemonkIE TrixIE WPF4.5 beta 假设其中之一有效
答案 1 :(得分:0)
您为什么在href属性中使用javascript
尝试
var element = document.getElementsByClassName("class")[0];
element.addEventListener("click", function(event){
window.location.href = "your_location"
});
答案 2 :(得分:-1)
在href中添加文件扩展名后尝试。确保您的文件存在于同一文件夹中。添加目标文件的扩展名后,我已经尝试过了,并且工作正常。