我可以在下面添加什么来防止在除夕晚上8点之后弹出窗口?为具有Cookie的弹出窗口设置到期日期(和时间)
$(document).ready(function(){
// Start Cookie for PopUp
if (document.cookie.indexOf('colorframe=true') === -1) {
var expires = new Date();
expires.setDate(expires.getDate()+1);
document.cookie = "colorframe=true; escKey=true; expires="+expires.toUTCString();
// Start Popup
setTimeout(function() {
$.colorbox({
escKey: true,
html: '<a href="---"><img src="---" width="550" height="550" alt="New Years Eve at ---"/></a>'
});
}, 2000);
};
});
根据当地时区或服务器的时区为晚上8点? – yts
伟大的问题。格林威治标准时间5或EST ... – mdnash