弹出框cookie修改

2015-10-26 13:38:00
admin
原创
606
摘要:弹出框cookie修改

$(function(){
    function showalert(){
    $("#new-zixun").show();
    }
var  userNameCookie=$.cookies.get('userNameCookie');
var currentMillTime;
if(userNameCookie==null){
currentMillTime= (new Date()).getTime();
$.cookies.set('userNameCookie',currentMillTime.toString());
window.setTimeout(showalert, 10000);
}else{
currentMillTime= (new Date()).getTime();
if((currentMillTime-parseInt(userNameCookie))/3600000<24){
currentMillTime= (new Date()).getTime();
$.cookies.set('userNameCookie',currentMillTime.toString());
$("#new-zixun").hide();
}else{
currentMillTime= (new Date()).getTime();
$.cookies.set('userNameCookie',currentMillTime.toString());
window.setTimeout(showalert, 10000);
}
}
$("#jinganweixin").click(function(){
$("#erweima").removeClass("erweima-show").addClass("erweima-hide");
});
$("#zixunclose").click(function(){
currentMillTime = (new Date()).getTime();
$.cookies.set('userNameCookie',currentMillTime.toString());
$("#new-zixun").hide();
});
$("#zixunnow").click(function(){
currentMillTime= (new Date()).getTime();
$.cookies.set('userNameCookie',currentMillTime.toString());
})
 
});

发表评论
评论通过审核之后才会显示。
文章分类
联系方式
联系人: 郑州-小万
电话: 13803993919
Email: 1027060531@qq.com
QQ: 1027060531
网址: www.wanhejia.com