新浪首页全屏显示广告代码

2008-02-23 07:41:18来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

<table width=760 border=0 cellspacing=0 cellpadding=0>
<tr>
<td align=center><!--interstitial begin-->
<script language="javascript">
<!--
//时间计算
SYfullscreen=false;
today=new Date();
function testdate()
{
<!--D339B424C314-->
//全屏开始如果是9点到10则显示下面的图片
if(today.getHours()>='1' && today.getHours()<'23')
{
adInterPath='http://auto.263.net/auto_lib/file/dealer/yfstudio/jl/flash/300-300kanche.swf';SYfullscreen=true
}
<!--A67C2659380C-->
//全屏开始如果是10点到11点则是下面的图片
if(today.getHours()>='0' && today.getHours()<'1')
{
adInterPath='http://auto.263.net/auto_lib/file/dealer/yfstudio/jl/flash/468-95.swf';SYfullscreen=true
}
}
testdate();

if(SYfullscreen==true)
{
if (document.all) {
// this is a 4.x browser, no?
document.write('<SCRI' 'PT LANGUAGE="javascript1.2"');
document.writeln(' SRC="time.js"></SCR' 'IPT>'); //显示时间与停留时间的js文件路径
}
}
// -->
</script>
<script language="javascript">
<!--
if(SYfullscreen==true)
{
if (document.all) {
// this is a 4.x browser, no?
document.write('<DIV ID="hiddenLayer" style="display: none; height: 450px;">');
if (getsGlu) {
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>
------------------------------------
上面的放在body下面其中有一个外部引用的js文件,
--------------------------------
var ads_agt=navigator.userAgent.toLowerCase();
var ads_is_major = parseInt(navigator.appVersion);

var ads_is_ie = ((ads_agt.indexOf("msie") != -1) && (ads_agt.indexOf("opera") == -1) && (ads_agt.indexOf("omniweb") == -1));
var ads_is_ie3 = (ads_is_ie && (ads_is_major < 4));
var ads_is_ie4 = (ads_is_ie && (ads_is_major == 4) && (ads_agt.indexOf("msie 5")==-1) && (ads_agt.indexOf("msie 6")==-1));
var ads_is_ie4up = (ads_is_ie && (ads_is_major >= 4));
var ads_is_ie5 = (ads_is_ie && (ads_is_major == 4) && (ads_agt.indexOf("msie 5.0")!=-1) );
var ads_is_ie5up = (ads_is_ie && !ads_is_ie3 && !ads_is_ie4);
var ads_is_ie5_1_macbeta = (ads_is_ie && (ads_agt.indexOf("mac")!=-1) && (ads_agt.indexOf("5.1b")!=-1));

var ads_is_nav = ((ads_agt.indexOf('mozilla')!=-1) && (ads_agt.indexOf('spoofer')==-1)
&& (ads_agt.indexOf('compatible') == -1) && (ads_agt.indexOf('opera')==-1)
&& (ads_agt.indexOf('webtv')==-1));
var ads_is_nav6 = (ads_is_nav && (ads_agt.indexOf("netscape6")!=-1) && (ads_agt.indexOf("6.1")==-1));
var ads_is_nav6up = (ads_is_nav && !ads_is_nav4 && !ads_is_nav3 && !ads_is_nav2);
var ads_is_nav6_1 = (ads_is_nav && (ads_agt.indexOf("netscape6")!=-1) && (ads_agt.indexOf("6.1")!=-1));
var ads_is_nav6_1up = (ads_is_nav && !ads_is_nav6 && !ads_is_nav4 && !ads_is_nav3 && !ads_is_nav2);


getsGlu = ((ads_is_ie5up && !ads_is_ie5_1_macbeta) || ads_is_nav6_1up);


//function changediv(depth)
//{
// divAll.style.zIndex=depth
// }
function changediv()
{
document.getElementById('hiddenLayer').style.display = "block";
document.getElementById('interstitialFrame').src = adInterPath;
setTimeout("hidediv()",10000)
}
function hidediv()
{
document.getElementById('hiddenLayer').style.display="none";
SYtag=2;
}
function showfull()
{
setTimeout("changediv()",3000);
}
showfull()
-----------------------------------
js文件内容

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:网页媒体播放器代码详解

下一篇:JavaScript实现窗口从天而降效果