728x90
출처 : http://firejune.com/98&ct1=8&ct2=42

아래의 소스를 새창을 띄울 부모문서의 <head></head>사이에 넣어 주세요 

<SCRIPT LANGUAGE="JavaScript">
<!--
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( "Notice" ) != "done" ) {
//새창으로 열릴 페이지의 경로 및 크기와 위치를 지정해 주세요.
noticeWindow  =  window.open('http://www.wowman.org','notice','left=0, top=0, width="30"0,height=200');
noticeWindow.opener = self; }

// -->
</SCRIPT>




아래의 소스를 새창으로 열릴 문서의 <head>와</head> <span class="key1" onclick="keyword_open('/kview.php?kd=%ED%83%9C%EA%B7%B8+')">태그 </span>사이에 넣어주세요

<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.pop.Notice.checked )
setCookie( "Notice", "done" , 1);//1은 하루동안 새창을 열지 않게 합니다.
window.close();
}
// -->
</SCRIPT>


아래의 소스를 새창으로 새창으로 열릴 문서의  <body>와</body><span class="key1" onclick="keyword_open('/kview.php?kd=%ED%83%9C%EA%B7%B8+')">태그 </span>사이에 넣어주세요



<form name=pop>
<p align="center">
<input type=checkbox name="Notice" value="">다음부터 공지창 띄우지 않음<a href="javascript:history.onclick=closeWin()">[닫기]</a>  
</form>
728x90

'Developer > JavaScript' 카테고리의 다른 글

랜덤 이미지 출력  (0) 2007.05.25
자바스크립트로 마우스 휠 제어하기  (0) 2007.05.25
텍스트영역 리사이즈 컴포넌트  (0) 2007.05.25

+ Recent posts