前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >一天显示一次广告JS代码

一天显示一次广告JS代码

原创
作者头像
Z4
修改2020-04-21 14:22:48
4.7K0
修改2020-04-21 14:22:48
举报
文章被收录于专栏:R专栏R专栏
代码语言:javascript
复制
function setUCookie(u_name,value){
    var exdate=new Date()
    exdate.setHours(exdate.getHours() + 8); 
    document.cookie=u_name+ "=" +escape(value)+"; expires="+exdate.toGMTString();
}
function getUCookie(u_name){
    if (document.cookie.length>0){ 
        u_start=document.cookie.indexOf(u_name + "=")
    if (u_start!=-1){ 
        u_start=u_start + u_name.length+1 
        u_end=document.cookie.indexOf(";",u_start)
        if (u_end==-1) u_end=document.cookie.length
            return unescape(document.cookie.substring(u_start,u_end))
        } 
    }
    return ""
}
function _setTimeout(){
    if(getUCookie("uTimeCookie")!=1){
document.writeln("");
    }
}
_setTimeout()
setUCookie("uTimeCookie","1");

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档