站长必须要知道的javascript广告代码
2018-09-24 21:42
参考了sina的代码,想出来的一个代码,请大家使用,不要传播,转载请注明:来自脚本之家
<!--
//时间计算
varshowit=false;
vartoday=newDate();
varurlpath;
functiontestdate()
{
urlpath=
if(today.getHours()>=10&&today.getHours()<12)
{
urlpath=//
}
}
testdate();
varOPER=navigator.userAgent.indexOf(Opera);
if(showit==true)
{
if(document.all&&MSIE!=-1&&OPER==-1){
//thisisa4.xbrowser,no?
functionchangediv(){
document.getElementById(hiddenLayer).style.display=block;
document.getElementById(interstitialFrame).src=urlpath;
setTimeout(hidediv(),5000)
}
functionhidediv(){
document.getElementById(hiddenLayer).style.display=none;
SYtag=2;
}
functionshowfull(){
setTimeout(changediv(),2000);
}
showfull();
}}
if(showit==true)
{
if(document.all&&MSIE!=-1&&OPER==-1){
//thisisa4.xbrowser,no?
document.write(<DIVID=hiddenLayerstyle=display:none;height:0>);
expandableIframe=<IFRAMEid=interstitialframewidth=0HEIGHT=0NORESIZESCROLLING=NoFRAMEBORDER=0MARGINHEIGHT=0MARGINWIDTH=0></IFRAME>;
document.write(expandableIframe);
}
document.write(</div>);
}
//-->
文章标题:站长必须要知道的javascript广告代码
文章链接:http://soscw.com/index.php/essay/17707.html