试图打开网站的html文件。以下onclick在Internet Explorer中不起作用,但它适用于谷歌浏览器和Firefox。有什么建议么?html输入类型按钮在Internet Explorer中不工作
<tr id=tr1>
<td><input id=But1 style="background:url('butc.jpg')" value="Home" onclick="window.location.href='main.html'" type="button"></td>
<td><input type="button" id=But1 style="background:url('buto.jpg')" value="Advertise with us" onclick="window.location.href='advertise.html'" ></td>
<td><input id="But1" style="background:url('buto.jpg')" value="Become a marketer" onclick="window.location.href='market.html'" type="button"></td>
<td><input id="But1" style="background:url('buto.jpg')" value="BudBuddies" onclick="window.location.href='buds.html'" type="button"></td>
<td><input id="But1" style="background:url('buto.jpg')" value="BudTube" onclick="window.location.href='tube.html'" type="button"></td>
<td><input id="But1" style="background:url('buto.jpg')" value="Laws" onclick="window.location.href='laws.html'" type="button"></td>
</tr>
我是2天成HTML自学,并尽可能为什么我做事情的方式即时通讯做他们很好的真相是我不知道在这一点上做IM。我试图做的是打开一个HTML文件在同一个窗口上点击一个按钮,这是工作正常在Firefox和铬,但是当我打开它在Internet Explorer 8和9它不工作,所以任何建议什么我做错了非常感谢。我打开的所有html文件都是本地的。
什么不工作,你得到的错误? – Gabe
哪个IE是?它适用于我的IE9。 http://jsfiddle.net/GolezTrol/x4LvR/ – GolezTrol
为什么你有六个按钮都有相同的'id = But1'?一个'id'只能在页面上存在一次。 –