W3School TIY
(请在下面的文本框中编辑您的代码,然后单击此按钮测试结果。)
编辑您的代码:
<!DOCTYPE html> <html> <head> <script> function newDoc() { window.location.assign("http://www.w3school.com.cn/") } </script> </head> <body> <input type="button" value="加载新文档" onclick="newDoc()"> </body> </html>
查看结果: