手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >从新浪弄下来的全屏广告代码 与使用说明
从新浪弄下来的全屏广告代码 与使用说明
摘要://全屏开始if(today.getHours()>='14'&&today.getHours()='8'&&today.getHours(...

<><>

<SCRIPTlanguage=JavaScript>

<725A3E8355CB-->//全屏开始

if(today.getHours()>='14'&&today.getHours()<'15')

{

adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html?

http://sina.allyes.com/main/adfclick?

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

m${}/upload/2007315152115702.jpg';SYfullscreen=true

}<>

<>//全屏开始

if(today.getHours()>='8'&&today.getHours()<'9')

{

adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html?

http://sina.allyes.com/main/adfclick?

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

m${}/upload/2007315152115903.JPG';SYfullscreen=true

}<>

<>//全屏开始

if(today.getHours()>='16'&&today.getHours()<'17')

{

adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html?

http://sina.allyes.com/main/adfclick?

db=sina&bid=70483,101960,102064&cid=0,0,0&sid=94712&advid=3254&camid=13506&show=ignore&url=http://www.sagitar.com.cn/${}

/upload/2007315152115985.GIF';SYfullscreen=true

}<>

<>//全屏开始

if(today.getHours()>='17'&&today.getHours()<'18')

{

adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html?

http://sina.allyes.com/main/adfclick?

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

.ng/adspec=Flash&adtype=single_dui_lian&affiliate=sina&campaignid=842&channel=aoyun_page&log=0¶ms.styles=clickcmd?${}

/upload/2007315152115273.jpg';SYfullscreen=true

}<>

<>//全屏开始

if(today.getHours()>='18'&&today.getHours()<'19')

{

adInterPath='http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html?

http://sina.allyes.com/main/adfclick?

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$

{}/upload/2007315152115162.jpg';SYfullscreen=true

}<>

}}}

testdate();

varMSIE=navigator.userAgent.indexOf("MSIE");

varOPER=navigator.userAgent.indexOf("Opera");

if(SYfullscreen==true)

{

if(document.all&&MSIE!=-1&&OPER==-1){

//thisisa4.xbrowser,no?

functionchangediv(){

document.getElementById('hiddenLayer').style.display="block";

document.getElementById('interstitialFrame').src=adInterPath;

setTimeout("hidediv()",5000)

}

functionhidediv(){

document.getElementById('hiddenLayer').style.display="none";

SYtag=2;

}

functionshowfull(){

setTimeout("changediv()",2000);

}

showfull();

}

}

//-->

</SCRIPT>

<SCRIPTlanguage=JavaScript>

<>

</SCRIPT>

<><>

说明新浪主要是根据时间段来显示不同的广告,然后将动态控制iframe来显示广告

有个重要的文件

http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html

的代码如下,用${}作为分割符,利用了数组

复制代码 代码如下:

<html><head>

<metahttp-equiv="Content-type"content="text/html;charset=gb2312">

<title>新浪广告</title>

</head>

<bodybgcolor=#fffffftopmargin=0marginheight=0leftmargin=0marginwidth=0>

<center>

<scriptlanguage=javascript>

varpar=location.search.substr(1);

varary=par.split("${}");

document.writeln("<ahref='"+ary[0]+"'target=_blank><imgsrc="+ary[1]+"width=750height=450border=0></a>");

</script>

</center>

</body></html>

ary[0]为连接地址

ary[1]为图片地址

【从新浪弄下来的全屏广告代码 与使用说明】相关文章:

jquery任意位置浮动固定层插件用法实例

JavaScript正则表达式中的ignoreCase属性使用详解

JavaScript正则表达式中的global属性的使用

jQuery插件制作之全局函数用法实例

Javascript随机显示图片的源代码

你一定会收藏的Nodejs代码片段

些很实用且必用的小脚本代码

Ctrl + Enter提交前检测的代码

免费空间广告万能消除代码

JavaScript中的函数嵌套使用

精品推荐
分类导航