오늘 하루 이 창을 열지 않음

업데이트:

<html lang="ko">
<head>
<title>오늘 하루 이 창을 열지 않음</title>
<script type="text/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.notice_form.chkbox.checked ){ 
        setCookie( "maindiv", "done" , 1 ); 
    } 
    document.all['divpop'].style.visibility = "hidden";
}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">  
<div id="divpop" style="position:absolute;left:395px;top:190;z-index:200;visibility:hidden;">
<table width=300 height=400 cellpadding=2 cellspacing=0>
<tr>
    <td style="border:1px #666666 solid" height=360 align=center bgcolor=white>여기에 내용 삽입</td>
</tr>
<tr>
    <td align=right bgcolor=white>
        <form name="notice_form">
            <input type="checkbox" name="chkbox" value="checkbox">오늘 하루 이 창을 열지 않음
            <a href="javascript:closeWin();"><B>[닫기]</B></a>
        </form>
    </td>
</tr>
</table>
</div>  

<script type="text/javascript">
cookiedata = document.cookie;    
if ( cookiedata.indexOf("maindiv=done") < 0 ){      
   document.all['divpop'].style.visibility = "visible";
   } 
   else {
       document.all['divpop'].style.visibility = "hidden"; 
}
</script>
</body>
</html>

댓글남기기