<head>
<script language="JavaScript">
<!--
function
startTime(){
var time= new Date();
hours= time.getHours();
mins=
time.getMinutes();
secs=
time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=10;
//시간설정
Timer();
}
function Timer(){
var time= new Date();
hours=
time.getHours();
mins= time.getMinutes();
secs=
time.getSeconds();
curTime=hours*3600+mins*60+secs
if
(curTime>=closeTime){
document.all['divpop'].style.visibility =
"hidden";
}
else{
window.setTimeout("Timer()",1000)}
}
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 onLoad="startTime();">
<div id="divpop" style="background-color:rgb(255,255,204);
position:absolute; left:311px; top:118; z-index:200;
visibility:hidden;">
<table width=300 height=400 cellpadding=2
cellspacing=0>
<tr>
<td style="border:1px #666666 solid"
height="258" align=center bgcolor="#FFFFCC">
<p> </p>
<p><a href="http://tagin.net">태그인넷
공지</a></p>
<p>10초후에 자동으로 닫힙니다..</p>
</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>
댓글 쓰기 권한이 없습니다.
3 | 마우스오버시나오는 반투명 팝업메뉴 | 2009.09.05 |
2 | 레이어 팝업창 만들어줘요 | 2009.09.05 |
> | 레이어 팝업 - 정해진 시간동안 하루한번 열기 | 2009.09.05 |