1.页面转向新的页面:
<input type="button" onclick="window.location.href('连接')">
2.需要打开一个新的页面进行转向:
<input type="button" onclick="window.open('连接')">
由于浏览器内核不一样
IE中使用:
<input type="button" name="test" value="test" onClick="location.href='a.html'"/>
firefox中使用:
<a href="b.html"><input type="button" name="test" value="test"/></a>
本文介绍了如何使用HTML中的按钮实现页面跳转功能,并对比了不同浏览器(如IE和Firefox)中的实现方式。提供了两种主要的方法:一是直接通过`window.location.href`属性更改当前窗口地址实现跳转;二是利用`window.open`方法在新窗口打开指定页面。
1087

被折叠的 条评论
为什么被折叠?



