고수님들 정보
고수님들본문
밑에거는 팝업창인데 닫혀지지가 않습니다.
오류 수정 좀 부탁드리겠습니다.
------------------------------------------
<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 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.checkClose.p1.checked == true) {
setCookie("p1", "done" ,1);
}
self.close();
}
//-->
</script><style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<table width="600" border="0">
<tr>
<th colspan="2" scope="col"><img src="http://worldscreengolf.com/gnu4.utf8/popup.jpg"></th>
</tr>
<tr>
<td width="305"> </td>
<td width="285"><span style="margin:0px;">
<input type="checkbox" name="p1">
오늘 하루는 이 창을 띄우지 않습니다. <a href="#" onClick="closeWin()">닫기</a></span></td>
</tr>
</table>
if(document.checkClose.p1.checked == true) {
setCookie("p1", "done" ,1);
}
self.close();
}
//-->
</script><style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<table width="600" border="0">
<tr>
<th colspan="2" scope="col"><img src="http://worldscreengolf.com/gnu4.utf8/popup.jpg"></th>
</tr>
<tr>
<td width="305"> </td>
<td width="285"><span style="margin:0px;">
<input type="checkbox" name="p1">
오늘 하루는 이 창을 띄우지 않습니다. <a href="#" onClick="closeWin()">닫기</a></span></td>
</tr>
</table>
댓글 전체
-------------------- 01.. 아래의 스크립트를 <head></head> 사이에 넣는다..
<script>
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 ;
}
function pop(){
if(getCookie("openevent") != "done"){
winopen = window.open('open.htm','','width=350,height=480,status=no,scrollbars=no');
winopen.focus();
}
}
</script>
-------------------- 02..<body> 태그안에 onload="pop();" 을 삽입한다..
<body onload="pop();">
-------------------- 03.. 새창을 띄울 페이지 <head></head> 사이에 아래의 스크립트를 넣는다..
<script language="JavaScript">
<!-- 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 closeWin2()
{
if ( document.notice_form.chkbox.checked ){
setCookie( "openevent", "done" , 1 );
}
self.close();
}
// - JavaScript - -->
</script>
-------------------- 04..<body></body> 사이 원하는 위치에 아래의 소스를 넣는다
<form name="notice_form">
오늘 하루 이창을 열지 않음<input type="checkbox" name="chkbox" value="0" onclick="javascript:closeWin2();">
</form>
----참고용입니다^^_
<script>
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 ;
}
function pop(){
if(getCookie("openevent") != "done"){
winopen = window.open('open.htm','','width=350,height=480,status=no,scrollbars=no');
winopen.focus();
}
}
</script>
-------------------- 02..<body> 태그안에 onload="pop();" 을 삽입한다..
<body onload="pop();">
-------------------- 03.. 새창을 띄울 페이지 <head></head> 사이에 아래의 스크립트를 넣는다..
<script language="JavaScript">
<!-- 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 closeWin2()
{
if ( document.notice_form.chkbox.checked ){
setCookie( "openevent", "done" , 1 );
}
self.close();
}
// - JavaScript - -->
</script>
-------------------- 04..<body></body> 사이 원하는 위치에 아래의 소스를 넣는다
<form name="notice_form">
오늘 하루 이창을 열지 않음<input type="checkbox" name="chkbox" value="0" onclick="javascript:closeWin2();">
</form>
----참고용입니다^^_