|
|
|
16년 전
|
조회 1,341
|
|
|
|
16년 전
|
조회 1,719
|
|
|
|
16년 전
|
조회 3,955
|
|
|
|
16년 전
|
조회 4,889
|
|
|
|
16년 전
|
조회 1,870
|
|
|
|
16년 전
|
조회 4,825
|
|
|
|
16년 전
|
조회 1,259
|
|
|
|
16년 전
|
조회 1,205
|
|
|
|
16년 전
|
조회 1,363
|
|
|
|
16년 전
|
조회 1,684
|
|
|
|
16년 전
|
조회 1,417
|
|
|
|
16년 전
|
조회 1,327
|
|
|
|
16년 전
|
조회 1,500
|
|
|
|
16년 전
|
조회 1,355
|
|
|
|
16년 전
|
조회 1,245
|
|
|
|
16년 전
|
조회 1,194
|
|
|
|
16년 전
|
조회 1,227
|
|
|
|
16년 전
|
조회 1,728
|
|
|
|
16년 전
|
조회 1,459
|
|
|
|
16년 전
|
조회 1,349
|
|
|
|
16년 전
|
조회 1,151
|
|
|
|
16년 전
|
조회 1,362
|
|
|
|
16년 전
|
조회 1,454
|
|
|
|
16년 전
|
조회 1,554
|
|
|
|
16년 전
|
조회 1,190
|
|
|
|
16년 전
|
조회 3,575
|
|
|
|
16년 전
|
조회 1,677
|
|
|
|
16년 전
|
조회 1,229
|
|
|
|
16년 전
|
조회 1,652
|
|
|
|
16년 전
|
조회 1,285
|
댓글 1개
왠만하면 이 방법 보다는 DIV로 팝업을 넣는 게 좋을 듯 합니다.
먼저 팝업창이 뜨게되는 메인페이지의 <head>와 </head>사이에 아래 소스를 넣습니다.
<!--- step 1 --->
<SCRIPT language=javascript>
<!--
// 이벤트 팝업
if(GetCookie('notice') == null)
{
window.open('pop.htm','notice','width=300,height=300','toolbar=no,member=no,status=no,scrollbars=no' );
}
<!-- 메인팝업 끝-->
function GetCookie(sName)
{
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++)
{
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
}
}
//-->
</SCRIPT>
<!--- step 1 --->
그리고 팝업으로 뜨게될 페이지에 아래 소스를 넣으세요.
<!---step 2 열린 팝업창에 적용--->
<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.forms[0].checkbox1.checked )
setCookie( "notice", "done" , 1);
self.close();
}
function GetCookie(sName)
{
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++)
{
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
}
}
//-->
</SCRIPT>
<body bgcolor="#FFFFFF" text="#000000">
<table width="300" align="center" height="300">
<tr>
<td bgcolor="#E6E1D9" height="256">
<div align="center">[예제] 팝업 페이지입니다.</div>
</td>
</tr>
<form>
<tr>
<td align=center bgcolor="#CAC7C1" height="28">
<input type="checkbox" name="checkbox1" value="checkbox">
하루동안 이창을 열지 않음 <a href="#" onclick="javascript:closeWin();"> [닫기]</a>
</td>
</tr>
</form>
</table>