W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript"> function currLocation() { alert(window.location) } function newLocation() { window.location="/index.html" } </script> </head> <body> <input type="button" onclick="currLocation()" value="显示当前的 URL"> <input type="button" onclick="newLocation()" value="改变 URL"> </body> </html>