首页 > 运营 > CMS建站 > 正文

网站第一次访问通知提示js写法 Cookie判断

2020-01-27 20:33:42
字体:
来源:转载
供稿:网友
 
之前备案时需要提示大家的一个弹窗效果,现在备案通过了,把代码小记下,有需要的朋友也可以试试,
 
<script type="text/javascript">
 
$(function(){
 
var tongzhi = GetCookie('tongzhitankuang');
 
if (1 != tongzhi) {
 
//tongzhitankuang();
 
}
 
});
 
function tongzhitankuang()
 
{
 
//询问框
 
var content = "温馨提示:亲爱的错新网用户,本站拟在本月26号(周一)起闭站重新备案,期间启用临时域名<font color='red'>(<a href='http://www.dedecms58.com' target='_blank' style='color:red;'>http://www.dedecms58.com</a>)</font>供大家正常使用!";
 
layer.confirm(content, {
 
title: false
 
,area: ['320px','auto']
 
,btn: ['知道了'] //按钮
 
,end: function(index, layero){ 
 
SetCookie('tongzhitankuang', 1);
 
return false;
 
 
}, function(){
 
layer.closeAll();
 
}
 
); 
 
}
 
</script>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表