티스토리 뷰

Tag & Script/JavaScript

POPUP

미련곰 2007. 8. 20. 15:39
POPUP


- index....

<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 "";
}

if ( getCookie( "pop" ) != "done" )
{
 noticeWindow  = window.open('팝업경로 및 파일명','pop','height=세로사이즈, width=가로사이즈, menubar=no, scrollbars=no, resizable=no, toolbar=no, status=no, top=100, left=510')
 noticeWindow.opener = self;
}

</script>



- popup

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<style>
td {
  font-size:12px;
  font-family:"돋움","돋움체","굴림체";
  color:#545454;
  line-height:160%
 }
</style>
<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( "pop", "done" , 1);
self.close();
}
</SCRIPT>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="380" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="이미지명" width="400" height="480"></td>
  </tr>
  <tr>
    <td  align="center"" bgcolor="#867539" style="padding:5"><form>
<input type=CHECKBOX name="Notice" value="">
        <font color="#FFFFFF">오늘하루 이 창을 열지 않음</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="javascript:history.onclick=closeWin()"><img src="close.gif" width="42" height="20" border="0" align="absmiddle"></a>
      </form>
</td>
  </tr>
</table>
</body>
</html>

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
글 보관함