YesYo.com MintState Forums
뒤로    YesYo.com MintState BBS > Tech > Javascript
검색
멤버이름    오토
비밀번호 
 

팝업소스(자동리사이즈)

페이지 정보

작성자 MintState 댓글 0건 조회 12,480회 작성일 08-11-17 12:36

본문

팝업소스(자동리사이즈)

팝업의 크기에 맞게 자동으로 리사이즈 됩니다.

<!--DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"-->
<HTML>
<HEAD>
<TITLE>POPUP SAMPLE</TITLE>
<META http-equiv=Content-Type content="text/html; charset=euc-kr">
<STYLE>TD {
	FONT-SIZE: 9pt; COLOR: #616161; LINE-HEIGHT: 12pt; FONT-FAMILY: 굴림
}
A:link {
	FONT-SIZE: 9pt; COLOR: #616161; FONT-FAMILY: 굴림,verdana; TEXT-DECORATION: none
}
A:visited {
	FONT-SIZE: 9pt; COLOR: #616161; FONT-FAMILY: 굴림,verdana; TEXT-DECORATION: none
}
A:active {
	FONT-SIZE: 9pt; COLOR: #616161; FONT-FAMILY: 굴림,verdana; TEXT-DECORATION: none
}
A:hover {
	FONT-SIZE: 9pt; COLOR: #9b6a4a; FONT-FAMILY: 굴림,verdana; TEXT-DECORATION: underline
}
</STYLE>

<SCRIPT language=JavaScript>
// 사용
//prize
//if(getCookie( "prize" ) != "done"){
//		window.open('/popup_sample.html','prize','status=yes,scrollbars=no,width=10,height=1,top=10,left=10');
//}

var frm;
function init(){
		frm	= document.userForm;
		resizeWin();
		self.focus();
}

function resizeWin(){ 
		var Width = parseInt(document.body.scrollWidth); 
		var Height = parseInt(document.body.scrollHeight); 
		var popWin = document.createElement("div"); 
		popWin.style.position = "absolute"; 
		popWin.style.left = "0px"; 
		popWin.style.top = "0px"; 
		popWin.style.width = "100%"; 
		popWin.style.height = "100%"; 

		document.body.appendChild(popWin); 

		window.resizeBy(Width-popWin.offsetWidth, Height-popWin.offsetHeight); 
		document.body.removeChild(popWin); 
} 

function sendIt(){
		if(!frm){ init(); }
		return false;
}

function setCookie(name, value, expiredays){
		var todayDate	= new Date();
		todayDate.setDate( todayDate.getDate() + expiredays );
		todayDate.setHours(0,0,0,0);
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + "; domain=;"
}

function closeWin(){
		if(!frm){ init(); }

		if(frm.eopen.checked){
				setCookie( "prize", "done" , 1);
				self.close();
		}
		else{
				self.close();
		}
}

function closeWinQuit(){
		if(!frm){ init(); }
		setCookie( "prize", "done" , 1);
		self.close();				
}				
</SCRIPT>
</HEAD>
<BODY leftMargin=0 topMargin=0 scroll=no onload=init();>
<TABLE cellSpacing=0 cellPadding=0 width=470 border=0>
<FORM name=userForm onsubmit="return sendIt()" method=get>
	<TR>
		<TD>
			<div style="width:80%;height:80px;text-align:center;"><br /><br />팝업내용</div>
		</TD>
    </TR>
	<TR>
		<TD align=middle></TD>
	</TR>
	<TR>
		<TD bgColor=#ebebeb height=5></TD>
	</TR>
	<TR>
		<TD bgColor=#ebebeb>
			<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
				<TR>
					<TD align=right><INPUT id=checkbox_check type=checkbox value=checkbox name=eopen> <IMG style="CURSOR: pointer" onclick=closeWinQuit() height=12 src="./dayclose_txt.gif" width=113></TD>
					<TD align=right width=50><IMG style="CURSOR: pointer" onclick=closeWin() height=21 src="./close_btn.gif" width=43></TD>
					<TD width=5>&nbsp;</TD>
				</TR>
			</TABLE>
		</TD>
	</TR>
	<TR>
		<TD bgColor=#ebebeb height=5></TD>
	</TR>
</FORM>
</TABLE>
</BODY>
</HTML>
첨부 파일
파일 종류: rar popup_sample.rar (2.6K, 48 views)

댓글목록

등록된 댓글이 없습니다.

Total 178건 4 페이지
Javascript 목록
번호 제목 글쓴이 조회 날짜
118 MintState 15230 11-17
117 MintState 10276 11-17
116 MintState 10720 11-17
115 MintState 13510 11-17
114 MintState 11287 11-17
113 MintState 12952 11-17
112 MintState 11423 11-17
111 MintState 12574 11-17
110 MintState 12817 11-17
109 MintState 22583 11-17
108 MintState 15260 11-17
107 MintState 11008 11-17
106 MintState 12566 11-17
105 MintState 11381 11-17
104 MintState 11583 11-17
103 MintState 12384 11-17
102 MintState 11561 11-17
101 MintState 16428 11-17
열람중 MintState 12481 11-17
99 MintState 9973 11-17
게시물 검색
모바일 버전으로 보기
CopyRight ©2004 - 2024, YesYo.com MintState. ™