我有一些代码,但它不适合我。我认为 cookie 不起作用,因为每当我尝试访问该站点时,都会显示弹出窗口。请帮忙。谢谢。
if ($.cookie("userAge") == null) {
displayVerification();
}
$("#verify").click(function() {
$( "#verification-dialog" ).dialog("close");
$.cookie("userAge", userAge);
});
$("#no-verify").click(function() {
window.location='http://google.pl';
});
function displayVerification() {
$( "#verification-dialog" ).dialog({
closeOnEscape: false,
dialogClass: "no-close",
draggable: false,
minWidth: 490,
modal: true,
resizable: false,
title: "Weryfikacja wieku"
});
}