|
02) À̺¥Æ® Æ˾÷â - ÇϷ絿¾È Æ˾÷â ¶ç¿ìÁö ¾Ê±â
¢º ÇϷ絿¾È Æ˾÷â ¶ç¿ìÁö ¾Ê±â ¼Ò½º¿¹Á¦1
(ºÎ¸ðâÀÎ index.htm¿¡ »ðÀÔ)
<html> <head>
<title>..</title> <meta http-equiv="Content-Type"
content="text/html; charset=euc-kr">
<script language="javascript">
<!--
function getCookie(name)
{
var Found = false
var start, end
var i = 0
// cookie ¹®ÀÚ¿ Àüü¸¦ °Ë»ö
while(i <= document.cookie.length)
{
start = i
end = start + name.length
// name°ú µ¿ÀÏÇÑ ¹®ÀÚ°¡ ÀÖ´Ù¸é
if(document.cookie.substring(start, end) == name)
{
Found = true
break
}
i++
}
// name ¹®ÀÚ¿À» cookie¿¡¼ ã¾Ò´Ù¸é
if(Found == true) {
start = end + 1
end = document.cookie.indexOf(";", start)
// ¸¶Áö¸· ºÎºÐÀ̶ó ´Â
°ÍÀ» ÀǹÌ(¸¶Áö¸·¿¡´Â ";"°¡ ¾ø´Ù)
if(end < start)
end = document.cookie.length
// name¿¡ ÇØ´çÇÏ´Â value°ªÀ» ÃßÃâÇÏ¿© ¸®ÅÏÇÑ´Ù.
return document.cookie.substring(start, end)
}
// ãÁö ¸øÇß´Ù¸é
return ""
}
function openMsgBox()
{
var eventCookie=getCookie("memo");
if (eventCookie != "no")
window.open('Æ˾÷âÆÄÀÏ','_blank','width=300,height=300,top=50,left=150');
//Æ˾÷âÀÇ ÁÖ¼Ò, °°Àº µµ¸ÞÀο¡ ÀÖ¾î¾ß ÇÑ´Ù.
}
openMsgBox();
//-->
</script>
</head>
<body>
</body>
</html>
|
¢º (Æ˾÷âÀÎ pop.htm¿¡ »ðÀÔ)
<html> <head>
<title></title> <head>
<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.myform.event.checked )
setCookie("memo", "no" , 1); // 1ÀÏ
°£ ÄíÅ°Àû¿ë
}
//-->
</script>
</head>
<body onunload="closeWin()">
<form name="myform">
<input type="checkbox" name="event">´ÙÀ½ºÎÅÍ
ÀÌ Ã¢À» ¿Áö¾ÊÀ½
<input type=button value="´Ý±â"
onclick="self.close()">
</form>
</body> </html> |
¢º ÇϷ絿¾È
Æ˾÷â ¶ç¿ìÁö ¾Ê±â¼Ò½º¿¹Á¦2
(ºÎ¸ðâÀÎ index.htm¿¡ »ðÀÔ)
<html> <head>
<title>..</title> <meta http-equiv="Content-Type"
content="text/html; charset=euc-kr">
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function change(form)
{
if (form.url.selectedIndex !=0)
parent.location = form.url.options[form.url.selectedIndex].value
}
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( "Notice" ) !=
"done" )
{
noticeWindow = window.open('pop.htm','notice','toolbar=no,location=no,directories=no,status=no,
menubar=no,scrollbars=no, resizable=no,width=400,height=400');
//winddow.openÀÇ ()ÀÇ °ÍÀº ÇÑÁÙ¿¡ °è¼Ó ºÙ¿©½á¾ß ¿À·ù°¡ ¾È³², Áٹٲî¸é ¿À·ù³²
noticeWindow.opener = self;
}
//-->
</script>
</head> <body>
</body> </html>
|
(Æ˾÷âÀÎ
pop.htm¿¡ »ðÀÔ)
<html> <head>
<title></title> <head>
<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].Notice.checked )
setCookie( "Notice", "done" , 1);
self.close();
}
//-->
</script> </head>
<body onunload="closeWin()">
<form>
<input type=CHECKBOX name="Notice"
value="">´Ù½Ã Æ˾÷ ¾È¶ä
<a href="javascript:window.close()">´Ý±â</a>
</form> </body> </html> |
¢º °°Àº ºê¶ó¿ìÁ®¿¡¼ Æ˾÷ ¶ç¿ì±â ¾Ê±â
(ºÎ¸ðâÀÎ index.htm¿¡ »ðÀÔ)
<html>
<head> <title>..</title> <meta
http-equiv="Content-Type" content="text/html;
charset=euc-kr"> <script
language="javascript">
<!--
function getCookie(name)
{
var Found = false
var start, end
var i = 0
// cookie ¹®ÀÚ¿ Àüü¸¦ °Ë»ö
while(i <= document.cookie.length)
{
start = i
end = start + name.length
// name°ú µ¿ÀÏÇÑ ¹®ÀÚ°¡ ÀÖ´Ù¸é
if(document.cookie.substring(start, end) == name)
{
Found = true
break
}
i++
}
// name ¹®ÀÚ¿À» cookie¿¡¼ ã¾Ò´Ù¸é
if(Found == true) {
start = end + 1
end = document.cookie.indexOf(";", start)
// ¸¶Áö¸· ºÎºÐÀ̶ó ´Â
°ÍÀ» ÀǹÌ(¸¶Áö¸·¿¡´Â ";"°¡ ¾ø´Ù)
if(end < start)
end = document.cookie.length
// name¿¡ ÇØ´çÇÏ´Â value°ªÀ» ÃßÃâÇÏ¿© ¸®ÅÏÇÑ´Ù.
return document.cookie.substring(start, end)
}
// ãÁö ¸øÇß´Ù¸é
return ""
}
function openMsgBox()
{
var eventCookie=getCookie("memo");
if (eventCookie != "no")
window.open('Æ˾÷âÆÄÀÏ','_blank','width=300,height=300,top=50,left=150');
//Æ˾÷âÀÇ ÁÖ¼Ò, °°Àº µµ¸ÞÀο¡ ÀÖ¾î¾ß ÇÑ´Ù.
}
openMsgBox();
//-->
</script> </head> <body>
</body> </html>
|
¢º (Æ˾÷âÀÎ pop.htm¿¡ »ðÀÔ)
<html>
<head> <title></title> <head>
<script language="JavaScript">
<!--
function setCookie( name, value, expiredays )
{
//°°Àº â¿¡¼¸¸ ¾È¶ç¿ò.
//expiredays °ªÀº »ó°ü¾øÀ½.
document.cookie = name + "=" + escape( value ) + ";
path=/;";
function closeWin()
{
if ( document.myform.event.checked )
setCookie("memo", "no" , 1); // 1ÀÏ °£ ÄíÅ°Àû¿ë
}
//-->
</script> </head> <body onunload="closeWin()">
<form name="myform">
<input type="checkbox" name="event">´ÙÀ½ºÎÅÍ
ÀÌ Ã¢À» ¿Áö¾ÊÀ½
<input type=button value="´Ý±â" onclick="self.close()">
</form> </body> </html> |
|
|
|
|
|