当点击Button 按钮时,用javaScript脚本怎样跳转到另一个页面.
点 "Button "按钮,怎样使用脚本跳到另一个页面. Thanks
------解决方案-------------------- <body>
<form method=post action= " ">
<input type= "button " value= "click " onclick= "window.location.href= 'http://www.google.com ' ">
</form>
</body>
------解决方案--------------------location.href = "a.htm ";
------解决方案-------------------- <body>
<form method=post action= " ">
<input type= "button " value= "click " onclick= "window.location.href= 'http://www.google.com ' ">
</form>
</body>
------解决方案-------------------- <body>
<form method=post action= " ">
<input type= "button " value= "click " onclick= "window.open ( 'http://www.baidu.com ', 'newwindow ', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no ') ">
</form>
</body>
------解决方案--------------------window.location.href= 'http://www.google.com '//直接在当前的文档中加载新的url内容
window.open ( 'http://www.baidu.com ', 'newwindow ', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no ')
//在原来窗口的基础上打开一个新的窗口,具体的窗口规格可以设置