从新浪弄下来的全屏广告代码 与使用说明

所属分类: 网络编程 / JavaScript 阅读数: 469
收藏 0 赞 0 分享
<!--全屏开始--><!--interstitial begin-->
      <SCRIPT language=JavaScript> 
<!--
//时间计算
SYfullscreen=false;
today=new Date();
function testdate()
{
    if(today.getMonth()=='2') //是否为3月
        {
            if(today.getDate()=='15') //是否为15日
            {
<!--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                                

}<!--$$ huiyan/2007-3-15 14:00:01 ~ 2007-3-15 14:59:59/B $-->
<!--4774607C08FD-->//全屏开始
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                            

}<!--$$ raowei/2007-3-15 ~ 2007-3-16 两天勿撤,谢谢!/B $-->
<!--35F6B37FB5E4-->//全屏开始
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                    

}<!--$$ limeng/2007-3-15 16:00:01 ~ 2007-3-15 16:59:59/B $-->
<!--C5EB1D51E54C-->//全屏开始
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&para;ms.styles=clickcmd?${}
/upload/2007315152115273.jpg';SYfullscreen=true                    

}<!--$$ limeng/2007-3-15 17:00:01 ~ 2007-3-15 17:59:59/B $-->
<!--D4C112442CAF-->//全屏开始
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                

}<!--$$ limeng/2007-3-15 ~ 2007-3-15/B $-->
}}}
testdate();
var MSIE=navigator.userAgent.indexOf("MSIE");
var OPER=navigator.userAgent.indexOf("Opera");
if(SYfullscreen==true)
{
    if (document.all && MSIE!=-1 && OPER==-1) { 
    // this is a 4.x browser, no? 
function changediv(){
    document.getElementById('hiddenLayer').style.display = "block";
    document.getElementById('interstitialFrame').src = adInterPath;
    setTimeout("hidediv()",5000)
}
function hidediv(){
    document.getElementById('hiddenLayer').style.display="none";
    SYtag=2;
}
function showfull(){
    setTimeout("changediv()",2000); 
}
showfull();
    }
}
// -->
</SCRIPT>
      <SCRIPT language=JavaScript> 
<!--
if(SYfullscreen==true)
{
    if (document.all && MSIE!=-1 && OPER==-1) { 
    // this is a 4.x browser, no? 
        document.write('<DIV ID="hiddenLayer" style="display: none; height: 450px;">');

        expandableIframe = '<IFRAME id="interstitialframe" width=750 HEIGHT=450 NORESIZE SCROLLING=No FRAMEBORDER=0 
MARGINHEIGHT=0 MARGINWIDTH=0></IFRAME>';
        document.write(expandableIframe);

}
document.write('</div>');
}
// -->
</SCRIPT>
<!--interstitial end--><!--全屏结束-->
说明新浪主要是根据时间段来显示不同的广告,然后将动态控制iframe来显示广告
有个重要的文件
http://ad4.sina.com.cn/sina/ae/ad_src/fullscreen/fullscreenv2.html
的代码如下,用${}作为分割符,利用了数组
复制代码 代码如下:

<html><head>
<meta http-equiv="Content-type" content="text/html; charset=gb2312">
<title>新浪广告</title>
</head>
<body bgcolor=#ffffff topmargin=0 marginheight=0 leftmargin=0 marginwidth=0>
<center>
<script language = javascript>
var par = location.search.substr(1);
var ary = par.split("${}");

document.writeln("<a href='"  + ary[0] + "' target=_blank><img src=" + ary[1] + " width=750 height=450 border=0></a>");
</script>
</center>
</body></html>

ary[0]为连接地址
ary[1]为图片地址
更多精彩内容其他人还在看

Node.js事件的正确使用方法

这篇文章主要给大家介绍了关于Node.js事件的正确使用方法,文中通过示例代码介绍的非常详细,对大家学习或者使用Node.js具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

微信小程序自定义导航栏实例代码

这篇文章主要给大家介绍了关于微信小程序自定义导航栏的相关资料,文中通过示例代码介绍的非常详细,对大家学习或者使用微信小程序具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

js字符串处理之绝妙的代码

这篇文章主要介绍了js字符串处理之绝妙的代码,包括字符串去重、将字符放在对象中遍历拼接出字符串、把字符串的奇数位和偶数位分别提取到两个数组中、将两个数组按奇数位和偶数位插入拼接为字符串,有时候需要对字符进行处理的时候可以用得到
收藏 0 赞 0 分享

vue设计一个倒计时秒杀的组件详解

这篇文章主要介绍了vue设计一个倒计时秒杀的组件,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

详解服务端预渲染之Nuxt(介绍篇)

这篇文章主要介绍了详解服务端预渲染之Nuxt(介绍篇),小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

javascrit中undefined和null的区别详解

这篇文章主要介绍了javascrit中undefined和null的区别详解,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

浅谈javascript中的prototype和__proto__的理解

这篇文章主要介绍了浅谈javascript中的prototype和__proto__的理解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

详解vue中this.$emit()的返回值是什么

这篇文章主要介绍了详解vue中this.$emit()的返回值是什么,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

浅谈express.js框架中间件(middleware)

这篇文章主要介绍了浅谈express.js框架中间件(middleware),小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

vue自定义指令directive的使用方法

这篇文章主要介绍了vue自定义指令directive的使用方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享
查看更多