最新更新 sitemap 网站制作设计本站搜索
网页设计
国外网站 韩国网站 个人主页 手提袋设计 CSS 网页特效 平面设计 网站设计 Flash CMS技巧 服装网站 php教程 photoshop 画册 服务器选用 数据库 Office
虚拟主机 域名注册 云主机 网页设计 客服QQ:8208442

在限定时间内自动关闭的窗口代码

日期:11-10    来源:中国设计秀    作者:cnwebshow.com

<html>Cp5中国设计秀
<head>Cp5中国设计秀
<meta http-equiv="Content-Language" content="zh-cn">Cp5中国设计秀
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">Cp5中国设计秀
<title>限定时间自动关闭的广告窗口</title>Cp5中国设计秀
</head>Cp5中国设计秀
<body>Cp5中国设计秀
<style type="text/css">Cp5中国设计秀
<!--Cp5中国设计秀
#sponsorAdDiv {position:absolute; height:1; width:1; top:0; left:0;}Cp5中国设计秀
-->Cp5中国设计秀
</style>Cp5中国设计秀
<SCRIPT LANGUAGE="JavaScript1.2">Cp5中国设计秀
adTime=8;//窗口关闭的时间设置Cp5中国设计秀
chanceAd=1;Cp5中国设计秀
var ns=(document.layers);Cp5中国设计秀
var ie=(document.all);Cp5中国设计秀
var w3=(document.getElementById && !ie);Cp5中国设计秀
adCount=0;Cp5中国设计秀
function initAd(){Cp5中国设计秀
if(!ns && !ie && !w3) return;Cp5中国设计秀
if(ie)                adDiv=eval('document.all.sponsorAdDiv.style');Cp5中国设计秀
else if(ns)        adDiv=eval('document.layers["sponsorAdDiv"]');Cp5中国设计秀
else if(w3)        adDiv=eval('document.getElementById("sponsorAdDiv").style');Cp5中国设计秀
randAd=Math.ceil(Math.random()*chanceAd);Cp5中国设计秀
if (ie||w3)Cp5中国设计秀
adDiv.visibility="visible";Cp5中国设计秀
elseCp5中国设计秀
adDiv.visibility ="show";Cp5中国设计秀
if(randAd==1) showAd();Cp5中国设计秀
}Cp5中国设计秀
function showAd(){Cp5中国设计秀
if(adCount<adTime*10){adCount+=1;Cp5中国设计秀
if (ie){documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft-20;Cp5中国设计秀
documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;}Cp5中国设计秀
else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;Cp5中国设计秀
documentHeight=window.innerHeight/2+window.pageYOffset-20;}Cp5中国设计秀
else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;Cp5中国设计秀
documentHeight=self.innerHeight/2+window.pageYOffset-20;}Cp5中国设计秀
adDiv.left=documentWidth-200;adDiv.top =documentHeight-200;Cp5中国设计秀
setTimeout("showAd()",100);}else closeAd();Cp5中国设计秀
}Cp5中国设计秀
function closeAd(){Cp5中国设计秀
if (ie||w3)Cp5中国设计秀
adDiv.display="none";Cp5中国设计秀
elseCp5中国设计秀
adDiv.visibility ="hide";Cp5中国设计秀
}Cp5中国设计秀
onload=initAd;Cp5中国设计秀
</script>Cp5中国设计秀
<div id="sponsorAdDiv" style="visibility:hidden">Cp5中国设计秀
<table width="450" height="350" bgcolor="008000"><tr><td>Cp5中国设计秀
<table width="445" height="345" bgcolor="F0FFF0"><tr><td>Cp5中国设计秀
欢迎进入酷站代码 www.cnwebshow.com<p> </p>Cp5中国设计秀
<p><span lang="zh-cn">本窗口显示8秒后将自动关闭!</span></td></tr></table></td></tr></table></div>Cp5中国设计秀
</body>Cp5中国设计秀
</html>Cp5中国设计秀

本文引用地址:/js/article_63458.html
网站地图 | 关于我们 | 联系我们 | 网站建设 | 广告服务 | 版权声明 | 免责声明