인터넷정보

레이어를 이용한 공지창 (사라지는 시간 설정) xp sp2 팝업창 대신...

알 수 없는 사용자 2007. 10. 18. 14:13
<HTML>
<META HTTP-EQUIVE="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=EUC-KR">
<head>
<title></title>


</head>
<body>
<script>
var time = null
function PlayTimer() {
playtime = setTimeout("close_cenlayer()", 30000); // 사라지는 시간 30초
}

function open_cenlayer() {
//var _x = document.body.clientWidth/2 + document.body.scrollLeft - 200;
//var _y = document.body.clientHeight/2 + document.body.scrollTop - 120;
var _x = 50;
var _y = 50;
layer.style.posLeft=_x;
layer.style.posTop=_y;
layer.style.visibility='visible';
}

function close_cenlayer() {
layer.style.visibility='hidden';
}

function load() {
open_cenlayer();PlayTimer();
}
window.onload=load;
</script>

<div id="layer" style="position:absolute;width:480;height:300;z-index:1;visibility:hidden;">
<table border="1" width="100%" height="100%" cellspacing="0" cellpadding="0" bgcolor=252525>
<tr>
<td align="center" style="font-family:Verdana; font-size:9pt; color:white;"><b>※ 공 지 라 우 ※</b><br><br>
내용<br>
내용<br>
내용<br>
내용<br>
내용<br>
<br>
{알림}<br><br>
<font color=ffffff>
내용<br>내용</font>
<font color=ff0000>
<br></font><font color=ffffff>내용
</font><br><br>
<input type="button" value="확인" onclick="close_cenlayer();clearTimeout(playtime)" onmouseover="this.style.backgroundColor='#dfdfdf'" onmouseout="this.style.backgroundColor='#efefef'" onmouseup="this.style.backgroundColor='#dfdfdf'" onmousedown="this.style.backgroundColor='#efefef'" style="color:#777777; font-size:9pt; font-face:굴림; background-color:#efefef; border:1 solid #a0a0a0; width:50px; height:17px;;cursor:hand" onfocus="this.blur()"></b></td>
</tr>
</table>
</div>




</body>
</HTML>
반응형