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

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

페이지 정보

작성자 MintState 댓글 0건 조회 9,813회 작성일 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, 30 views)

댓글목록

등록된 댓글이 없습니다.

Total 178건 4 페이지
Javascript 목록
번호 제목 글쓴이 조회 날짜
118 MintState 11173 11-17
117 MintState 7676 11-17
116 MintState 8009 11-17
115 MintState 10469 11-17
114 MintState 8242 11-17
113 MintState 10375 11-17
112 MintState 8475 11-17
111 MintState 9579 11-17
110 MintState 10152 11-17
109 MintState 19781 11-17
108 MintState 11742 11-17
107 MintState 8245 11-17
106 MintState 9616 11-17
105 MintState 8824 11-17
104 MintState 8985 11-17
103 MintState 9694 11-17
102 MintState 8845 11-17
101 MintState 13439 11-17
열람중 MintState 9814 11-17
99 MintState 7327 11-17
게시물 검색
모바일 버전으로 보기
CopyRight ©2004 - 2021, YesYo.com MintState. ™