W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <head> <script> var myWindow; function openWin() { myWindow=window.open("", "", "width=400, height=200"); } function moveWin() { myWindow.moveTo(300, 0); myWindow.focus(); } </script> </head> <body> <input type="button" value="打开 myWindow" onclick="openWin()" /> <br><br> <input type="button" value="移动 myWindow" onclick="moveWin()" /> </body> </html>