
//CONTRolliNG EVENTS IN jquery$(document).ready(function(){if ($.cookie("anewsletter") != 1) { //centering with CSScenterPopup();//load popuploadPopup(); } //CLOSING POPUP//Click the x event!$("#popupContactClose").click(function(){disablePopup();$.cookie("anewsletter","1",{ expires: 1 });});//Click the bacground!$("#backgroundPopup").click(function(){disablePopup();$.cookie("anewsletter",{ expires: 1 });});//Press Escape event!$(document).keypress(function(e){if(e.keyCode==27 && popupStatus==1){ disablePopup(); $.cookie("anewsletter",{ expires: 1 });}});}); 非常感谢你!
解决方法 $.cookie可以将日期作为到期值,因此您可以使用以下内容var mIDnight = new Date();mIDnight.setHours(23,59,0);$.cookie('anewsletter','1',{ expires: mIDnight }); 总结 以上是内存溢出为你收集整理的对于在午夜到期的cookie的代码Javascript全部内容,希望文章能够帮你解决对于在午夜到期的cookie的代码Javascript所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)