⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 16.12 moveto方法.html

📁 javascript即用即差核心对象手册
💻 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 + -