<!DOCTYPE html>
	<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>Document</title>
	</head>
	<body>
		<div>
			<button onclick="openFn()">新窗口</button>
			<button onclick="moveTo()">开启吧</button>
			<button onclick="moveBy()">启动</button>
		</div>
	

	<script>
		var newWindow=null;
		function openFn(){
			newWindow=window.open('','','width=200,height=200');
		}
		function moveTo(){
			newWindow.moveTo(Math.random()*900,Math.random()*900);
			newWindow.focus();
			setTimeout(moveTo,500);
		}
		
	</script>
</body>
</html>

相关文章:

  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2021-11-24
猜你喜欢
  • 2021-12-14
  • 2022-12-23
  • 2021-04-06
  • 2021-09-08
  • 2021-07-19
  • 2022-12-23
  • 2021-07-23
相关资源
相似解决方案