============================ 아래 코드를 index.html 헤드 란에 넣으세요..===
<script>
<!--
function setCookie( name, value, expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function getCookie( name )
{
var nameOfCookie = name + "=";
var x = 0;
while ( x <= document.cookie.length )
{
var y = (x+nameOfCookie.length);
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}
if (getCookie("popup15") !="done")
{
window.open('popup/06-06.htm','popup15','width=422,height=638,top=10,left=10');
}
//-->
</script>
======> 여기서 변경할 껏은 제일 아래쪽에 보시면.. window.open 코드 옆에 세창 띄울 html 문서명과 크기, 위치등만 변경하시면 됩니다.^^
================================= 아래있는 코드는 새창이 뜨는 쪽에 붙여 넣어세요..^^
<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.form1.popup15.checked )
setCookie( "popup15", "done" , 1);
window.close();
}
</script>
===== 요까이가.. 헤드 테그 안에 들어가는 내용이고... 아래 코드는 본문에 들어갈 내용이기 때문에.. 원하는 위치에 넣으세요..
<form name="form1">
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"><input type="checkbox" name="popup15" value="" onFocus="this.blur();"></td>
<td><a href="closeWin()" onFocus="this.blur();">오늘 하루 닫기</a></td>
</tr>
</table>
</form>
=== 위에 있는 코드는 폼에 관련한 것은 건들지 마시고..... 문자만 알아서.. 하든지.. 이미지 넣던지 하세요..ㅋㅋㅋㅋ 알아서 넣기를..^^
바이바이.. 내가 해줄수 있는 것은 여기까지...^^ 안되면.. 될때까지 맨땅에 해딩하기..^^
<script>
<!--
function setCookie( name, value, expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function getCookie( name )
{
var nameOfCookie = name + "=";
var x = 0;
while ( x <= document.cookie.length )
{
var y = (x+nameOfCookie.length);
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}
if (getCookie("popup15") !="done")
{
window.open('popup/06-06.htm','popup15','width=422,height=638,top=10,left=10');
}
//-->
</script>
======> 여기서 변경할 껏은 제일 아래쪽에 보시면.. window.open 코드 옆에 세창 띄울 html 문서명과 크기, 위치등만 변경하시면 됩니다.^^
================================= 아래있는 코드는 새창이 뜨는 쪽에 붙여 넣어세요..^^
<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.form1.popup15.checked )
setCookie( "popup15", "done" , 1);
window.close();
}
</script>
===== 요까이가.. 헤드 테그 안에 들어가는 내용이고... 아래 코드는 본문에 들어갈 내용이기 때문에.. 원하는 위치에 넣으세요..
<form name="form1">
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"><input type="checkbox" name="popup15" value="" onFocus="this.blur();"></td>
<td><a href="closeWin()" onFocus="this.blur();">오늘 하루 닫기</a></td>
</tr>
</table>
</form>
=== 위에 있는 코드는 폼에 관련한 것은 건들지 마시고..... 문자만 알아서.. 하든지.. 이미지 넣던지 하세요..ㅋㅋㅋㅋ 알아서 넣기를..^^
바이바이.. 내가 해줄수 있는 것은 여기까지...^^ 안되면.. 될때까지 맨땅에 해딩하기..^^
'웹디자인 노트 > 웹관련 튜토리얼' 카테고리의 다른 글
플래시(object, embed 태그 사용) 이상한 액티브X 영향을 받지 않는 플레이코드 (1) | 2006.11.16 |
---|---|
IFRAME에 원하는 링크 걸기 (0) | 2006.11.16 |
새창 닫기 코드... xp에서도 에러없이 닫음..^^ (0) | 2006.11.16 |
새창이 뜨면 자동으로 부모창 닫기 (0) | 2006.11.16 |
스크롤 바 없애기-css (0) | 2006.11.16 |