<script> <BR><!-- <BR>//时间计算 <BR>SYfullscreen=false; <BR>today=new Date(); <BR>function testdate() <BR>{ <BR> if(today.getMonth()=='2') //是否为3月 <BR> { <BR> if(today.getDate()=='15') //是否为15日 <BR> { <BR><!--725A3E8355CB-->//全屏开始 <BR>if(today.getHours()>='14' && today.getHours()<'15') <BR>{ <BR> adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html? <BR>http://sina.allyes.com/main/adfclick? <BR>db=sina&bid=73474,105318,105433&cid=0,0,0&sid=97875&advid=3716&camid=14291&show=ignore&url=http://61.49.38.5/tzhddoc/index.ht <BR>m${}/upload/2007315152115702.jpg';SYfullscreen=true <br><br>}<!--$$ huiyan/2007-3-15 14:00:01 ~ 2007-3-15 14:59:59/B $--> <BR><!--4774607C08FD-->//全屏开始 <BR>if(today.getHours()>='8' && today.getHours()<'9') <BR>{ <BR> adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html? <BR>http://sina.allyes.com/main/adfclick? <BR>db=sina&bid=73474,105318,105433&cid=0,0,0&sid=97875&advid=3716&camid=14291&show=ignore&url=http://61.49.38.5/tzhddoc/index.ht <BR>m${}/upload/2007315152115903.JPG';SYfullscreen=true <br><br>}<!--$$ raowei/2007-3-15 ~ 2007-3-16 两天勿撤,谢谢!/B $--> <BR><!--35F6B37FB5E4-->//全屏开始 <BR>if(today.getHours()>='16' && today.getHours()<'17') <BR>{ <BR> adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html? <BR>http://sina.allyes.com/main/adfclick? <BR>db=sina&bid=70483,101960,102064&cid=0,0,0&sid=94712&advid=3254&camid=13506&show=ignore&url=http://www.sagitar.com.cn/${} <BR>/upload/2007315152115985.GIF';SYfullscreen=true <br><br>}<!--$$ limeng/2007-3-15 16:00:01 ~ 2007-3-15 16:59:59/B $--> <BR><!--C5EB1D51E54C-->//全屏开始 <BR>if(today.getHours()>='17' && today.getHours()<'18') <BR>{ <BR> adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html? <BR>http://sina.allyes.com/main/adfclick? <BR>db=sina&bid=73214,104975,105088&cid=0,0,0&sid=97562&advid=3705&camid=14237&show=ignore&url=http://adclient.dentsu.com.cn/html <BR>.ng/adspec=Flash&adtype=single_dui_lian&affiliate=sina&campaignid=842&channel=aoyun_page&log=0¶ms.styles=clickcmd?${} <BR>/upload/2007315152115273.jpg';SYfullscreen=true <br><br>}<!--$$ limeng/2007-3-15 17:00:01 ~ 2007-3-15 17:59:59/B $--> <BR><!--D4C112442CAF-->//全屏开始 <BR>if(today.getHours()>='18' && today.getHours()<'19') <BR>{ <BR> adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html? <BR>http://sina.allyes.com/main/adfclick? <BR>db=sina&bid=73271,105059,105175&cid=0,0,0&sid=97643&advid=3254&camid=14234&show=ignore&url=http://www.sagitar.com.cn/olympic$ <BR>{}/upload/2007315152115162.jpg';SYfullscreen=true <br><br>}<!--$$ limeng/2007-3-15 ~ 2007-3-15/B $--> <BR>}}} <BR>testdate(); <BR>var MSIE=navigator.userAgent.indexOf("MSIE"); <BR>var OPER=navigator.userAgent.indexOf("Opera"); <BR>if(SYfullscreen==true) <BR>{ <BR> if (document.all && MSIE!=-1 && OPER==-1) { <BR> // this is a 4.x browser, no? <BR>function changediv(){ <BR> document.getElementById('hiddenLayer').style.display = "block"; <BR> document.getElementById('interstitialFrame').src = adInterPath; <BR> setTimeout("hidediv()",5000) <BR>} <BR>function hidediv(){ <BR> document.getElementById('hiddenLayer').style.display="none"; <BR> SYtag=2; <BR>} <BR>function showfull(){ <BR> setTimeout("changediv()",2000); <BR>} <BR>showfull(); <BR> } <BR>} <BR>// --> <BR></script>
<script> <BR><!-- <BR>if(SYfullscreen==true) <BR>{ <BR> if (document.all && MSIE!=-1 && OPER==-1) { <BR> // this is a 4.x browser, no? <BR> document.write('<DIV ID="hiddenLayer" style="display: none; height: 450px;">'); <br><br> expandableIframe = '<IFRAME id="interstitialframe" width=750 HEIGHT=450 NORESIZE SCROLLING=No FRAMEBORDER=0 <BR>MARGINHEIGHT=0 MARGINWIDTH=0>'; <BR> document.write(expandableIframe); <br><br>} <BR>document.write(''); <BR>} <BR>// --> <BR></script>
说明新浪主要是根据时间段来显示不同的广告,然后将动态控制iframe来显示广告
有个重要的文件
http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html的代码如下,用${}作为分割符,利用了数组
新浪广告
<script> <BR>var par = location.search.substr(1); <BR>var ary = par.split("${}"); <br><br>document.writeln("<a href='" + ary[0] + "' target=_blank><img src=" + ary[1] + " style="max-width:90%"从新浪弄下来的全屏广告代码 与使用说明_广告代码" >"); <BR></script>
ary[0]为连接地址
ary[1]为图片地址