<head>
<!-- 레이어팝업시작 -->
<script language="Javascript">
<!--
function setCookie( name, value, expirehours ) {
var todayDate = new Date();
todayDate.setHours( todayDate.getHours() + expirehours );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function closeWin() {
document.getElementById('popup').style.display = "none";
}
function todaycloseWin() {
setCookie( "ncookie", "done" , 24 );
document.getElementById('popup').style.display = "none";
}
-->
</script>
</head>
<body>
<div id="popup" style="position:absolute; left:50%; top:120px; margin-left:-500px; z-index:1000;">
<img src="openpopup.jpg" usemap="#pop" />
<map name="pop">
<area shape="rect" coords="267,541,400,554" href="#" onclick="todaycloseWin();" alt="닫기">
<area shape="rect" coords="407,542,437,554" href="#" onclick="closeWin();" alt="오늘 하루 열지 않기">
</map>
<!--쿠키 설정 -->
<script language="Javascript">
<!--
cookiedata = document.cookie;
if ( cookiedata.indexOf("ncookie=done") < 0 ){
document.getElementById('popup').style.display = "block";
} else {
document.getElementById('popup').style.display = "none";
}
-->
</script>
</div>
</body>
[출처] 레이어 팝업 - 닫기&오늘 하루 열지 않기|작성자 미르야
'리눅스 문서' 카테고리의 다른 글
mysql Replicating (0) | 2014.11.25 |
---|---|
PHP 와 MongoDB 사용법 (0) | 2014.11.25 |
backuppc 소스설치 하기 (0) | 2014.11.25 |
rsyslog + LogAnalyzer (0) | 2014.11.25 |
memcached Cacti Template (0) | 2014.11.25 |