function setCookie(name, value, expiredays) {
   var todayDate = new Date();
   todayDate.setDate( todayDate.getDate() + expiredays );
   document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

Ex) 

 

오늘 하루 이 창을 열지 않습니다. <input type="checkbox" onclick="setCookie("chkPopup", "true", 1); window.close();">

Posted by 탁이98
,