2°³ÀÇ ½ºÅ©¸³Æ® ÇüÅÂÀÔ´Ï´Ù. ºÎ¸ðâ¿¡ »ðÀÔÇÒ ºÎºÐ°ú Æ˾÷⠺κÐÀ¸·Î ³ª´©¾îÁý´Ï´Ù.
1. ºÎ¸ð⠺κР<script language="javascript">
// À̺κкÎÅÍ ¼öÁ¤ÇÒ ÇÊ¿ä ¾ø½À´Ï´Ù. function getCookie(name) { var Found = false var start, end var i = 0
while(i <= document.cookie.length) { start = i end = start + name.length
if(document.cookie.substring(start, end) == name) { Found = true break } i++ }
if(Found == true) { start = end + 1 end = document.cookie.indexOf(";", start) if(end < start) end = document.cookie.length return document.cookie.substring(start, end) } return "" } // À̺κР±îÁö´Â ¼öÁ¤ÇÒ ÇÊ¿ä ¾ø½À´Ï´Ù.
function openPopup() { var noticeCookie=getCookie("CookieName"); // ÄíÅ°³×ÀÓ ÁöÁ¤ if (noticeCookie != "no") window.open('oncepopup2.html','pop','width=350,height=400,top=50,left=150'); // window.open('Æ˾÷â À¥ÆäÀÌÁö','À©µµ¿ì¸í','width=350,height=400,top=50,left=150'); } openPopup(); // ÀÚµ¿À¸·Î Æ˾÷ ¶ç¿ì±â </SCRIPT>
2. Æ˾÷⠺κР==> oncepopup2.html
<script language="JavaScript"> function setCookie( name, value, expiredays ) { var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" }
function closeWin() { { if ( document.cnjform.notice.checked ) // Æû³×ÀÓ cnjform Àº µ¿ÀÏÇØ¾ß ÇÕ´Ï´Ù. setCookie("CookieName", "no" , 1); // ºÎ¸ðâ¿¡¼ ÁöÁ¤ÇÑ ÄíÅ°³×ÀÓ°ú ÀÏÄ¡ ÇØ¾ß ÇÕ´Ï´Ù. } top.close(); } </script>
<form name="cnjform"> <input type="checkbox" name="notice" onclick="closeWin()">üũÇÏ¸é ¿À´Ã ÇÏ·íµ¿¾È ÆäÀÌÁö¸¦ ¿Áö ¾Ê½À´Ï´Ù. </form>
|