사이트 내 전체검색
괜찮은 레이어 팝업창 소스
https://cmd.kr/javascript/375 URL이 복사되었습니다.

본문

<head>
<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.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"> 


<!-- POPUP -->
<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>
        <form name="notice_form">
    <td align=right bgcolor=white>
        <input type="checkbox" name="chkbox" value="checkbox">오늘 하루 이 창을 열지 않음
        <a href="javascript:closeWin();"><B>[닫기]</B></a>
    </td>
</tr>
        </form>
</table>
</div> 

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

출처 : http://www.aircon1004.com/data/bbs/board.php?bo_table=pds1&wr_id=187

댓글목록

등록된 댓글이 없습니다.

831 (12/17P)

Search

Copyright © Cmd 명령어 18.118.193.28