Javascript 400例-002-定时打开窗口

定时弹出窗口

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>定时打开窗口</title>
</head>
<body>
<h1>自动弹出</h1>
<script type="text/javascript">
function pp(){
window.open("new.htm","new","height=190,width=775,top=30,left=30");
}
setTimeout("pp()",5000);
</script>
</body>
<h1>定时打开窗口</h1>
</html>

使用时间函数 

setTimeout()


你可能感兴趣的:(window.open,setTimeout())