中国政法大学法学硕士:我需要一个广告代码 很着急用

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/30 04:19:26
这个广告代码是这样的 进入一个网页时 弹出一个广告 然后过一定时间会自动自动关闭,那位可以提供 我先谢了

现做的将以下代码加入你的网页就行了。
<html>
<head>
<script language="javascript">
var xx;
function pop()
{xx=window.open("广告.htm","subwin","width=400,height=200");

//移动到屏幕中央。
xx.moveTo((screen.width-400)/2,(screen.height-200)/2);

//广告窗口放在最前面
xx.focus();

// 5秒后关闭
setTimeout("closepop()",5000);
}
function closepop()
{xx.close();
}
</script>
</head>
<body onload="javascript:pop();">
</body>
</html>