站长必须要知道的javascript广告代码 原创

原创  更新时间:2007年05月30日 00:00:00   原创 作者:  
(福利推荐:【腾讯云】服务器最新限时优惠活动,云服务器1核2G仅99元/年、2核4G仅768元/3年,立即抢购>>>:9i0i.cn/qcloud

(福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

参考了sina的代码,想出来的一个代码,请大家使用,不要传播,转载请注明:来自程序员之家
<!--
//时间计算
var showit=false;
var today=new Date();
var urlpath;
function testdate()
{
urlpath='http://www.scripthome.net/bbs';showit=true
if(today.getHours()>='10' && today.getHours()<'12')
{    
urlpath='';showit=true
}
}
testdate();

var MSIE=navigator.userAgent.indexOf("MSIE");
var OPER=navigator.userAgent.indexOf("Opera");
if(showit==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 = urlpath;
    setTimeout("hidediv()",5000)
}
function hidediv(){
    document.getElementById('hiddenLayer').style.display="none";
    SYtag=2;
}
function showfull(){
    setTimeout("changediv()",2000); 
}
showfull();
}}
if(showit==true)
{
    if (document.all && MSIE!=-1 && OPER==-1) { 
    // this is a 4.x browser, no? 
        document.write('<DIV ID="hiddenLayer" style="display: none; height: 0">');

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

相关文章

最新评论

?


http://www.vxiaotou.com