📄 16.12 moveto方法.html
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>moveTo方法演示</title>
</head>
<script>
var imoved=0;
intervalID=window.setInterval(moveWindow,100);
function moveWindow()
{
var ipx,ipy;
//随机产生x y坐标
ipx=Math.round(Math.random()*800);
ipy=Math.round(Math.random()*800);
window.moveTo(ipx,ipy);
imoved++;
if (imoved>=50)
window.clearInterval(intervalID);
}
</script>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -