高仿163网站广告弹出层(每天定时24小时弹出一次)

高仿163网站广告弹出层(每天定时24小时弹出一次) 这里和京东首页定时弹出广告功能一样;用JS实现网站首页弹出广告;超级炫酷的定时弹出图片广告;淘宝网站广告弹出层实现。

高仿163网站广告弹出层(每天定时24小时弹出一次)
可以有两种做法 
 
一、是标识符存入数据库 
 
 
二、利用jQuery.cookie 
 
我这里做的是比较简单的用到的知识是Jquery.cookie, 
这里要注意的一点是jquery.cookie的值 火狐能够获取,IE,360,谷歌不能直接获取到值,所以测试的时候最好用FF,你只需要把代码放到服务器上其它浏览器就可以完美生效了呢。
前端代码如下
<html> 
<head> 
    <script src="http://www.erdangjiade.com/Public/js/jquery.js"></script> 
    <style> 
        /*全局广告样式Start*/ 
        #globalAd{ width:600px; height:400px; overflow:hidden;position:fixed;display:none;margin:0 auto;z-index:10001} 
        .layer{width:100%; height:100%;  position:fixed; top:0px;left:0px;filter:alpha(opacity=50);opacity:0.5;background:#000;z-index:1000;display:none} 
        .globalContent{width:600px; height:400px;} 
        .globalContent img{max-width: 600px;height: 400px;} 
        .closeIco{width:400px;height:50px;margin-left: 20px;position: absolute;left: 345px;cursor:pointer;background:url("http://pics.rebatesme.com/newrm/images/cha.png") no-repeat scroll 190px 0;} 
        /*全局广告样式End*/ 
    </style> 
</head> 
<body> 
<div style="width:2000px;height:2500px;background:#fcc;"></div> 
<!--全局广告开始--> 
<div class="layer"></div> 
<div id="globalAd"> 
    <span οnclick="closeGlobalAd();" class="closeIco"></span> 
    <a href='http://www.erdangjiade.com/topic/186.html' target="_blank" class="globalContent" οnclick="redirectUrlToActive();"><img src="http://www.erdangjiade.com/Public/images/get_vip.png"/></a> 
</div> 
<!--全局广告结束--> 
</body> 
 
 
</html>



转载于:https://www.cnblogs.com/66daima/p/7507675.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值