五种方法教你如何在JS中从当前页跳转到指定页 - 第五种方法解析
最编程
2024-08-08 11:07:55
...
<script language="javascript">
top.location=’b.html’;
</script>
前进:history.forward();
或者history.go(1);
后退: history.back ();
或者history.go(-1);
实现点击按钮弹出窗口的代码:
document.getElementById( 'button' ).onclick = function(){
window.open ('page.html');
}
其中,button 是按钮的 id,page.html 是要弹出的窗口页面。