html - 如何使 href 将在 IE8 中的按钮上工作

标签 html xhtml internet-explorer-8

我要href将在 type="button" 上工作在 IE8 中。

<a href="submit.php"><input type="button" value="Submit" class="button" /></a>

其他浏览器工作正常但在 IE8 上上面的代码不工作。如何解决?

更新

<form action="submit.php" method="post"">
<input type="submit" value="Submit" class="button" />
</form>

我知道这个方法可以做到。但是我想知道其他方法如何在没有 <form></form> 的情况下让它在 IE8 上工作

最佳答案

onclick="window.location=this.parentNode.href;"/>

this.parentNode 可以引用一个标签,所以...它应该可以工作或者甚至可以测试 getAttribute

关于html - 如何使 href 将在 IE8 中的按钮上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2949910/

相关文章:

html - 在 DIV 内水平对齐 DIV - IE 不工作

html - 如何使 Bootstrap 中的特定元素不使用主题样式?

html - 如何使用 Bootstrap 更改部分导航栏的背景颜色

html - CSS DIV 悬停在 Internet Explorer 8 中不起作用

cookies - 重定向后打开新窗口时 IE8 会丢失 cookie

internet-explorer-8 - <ajaxToolkit :ReorderList> is not draggable in IE8 and chrome

jquery - 使用 fancyBox 的 HTML 属性 rel 错误

encoding - 对 xhtml5 : no more `<?xml?>` and now mandatory `meta` ? 感到困惑

php - 如何对同一种文件给出不同的标题描述,避免重复?

javascript - 有可用的 IE7.js 的 jquery 版本吗?