인터넷정보

팝업창 기능별 옵션 적용해서 새창 띄우기..

알 수 없는 사용자 2007. 10. 17. 15:28
<html>
<head>
<title>♡Camelot의 소스천국 태그피아♡</title>

</head>
<body>


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function customize(form) {    
var address = document.form1.url.value;  
var op_tool  = (document.form1.tool.checked== true)  ? 1 : 0;    
var op_loc_box  = (document.form1.loc_box.checked == true)  ? 1 : 0;    
var op_dir  = (document.form1.dir.checked == true)  ? 1 : 0;    
var op_stat  = (document.form1.stat.checked == true)  ? 1 : 0;    
var op_menu  = (document.form1.menu.checked == true)  ? 1 : 0;    
var op_scroll  = (document.form1.scroll.checked == true)  ? 1 : 0;    
var op_resize  = (document.form1.resize.checked == true)  ? 1 : 0;    
var op_wid  = document.form1.wid.value;  
var op_heigh = document.form1.heigh.value;                
var option = "toolbar="+ op_tool +",location="+ op_loc_box +",directories="
+ op_dir +",status="+ op_stat +",menubar="+ op_menu +",scrollbars="  
+ op_scroll +",resizable="  + op_resize +",width=" + op_wid +",height="+ op_heigh;
var win3 = window.open("", "what_I_want", option);  
var win4 = window.open(address, "what_I_want");
}
function clear(form) {
document.form1.wid.value="";
document.form1.heigh.value="";
}
// End -->
</SCRIPT>
<CENTER>
<br>
<TABLE cellpadding=5 border="1"><TR><TD>
<font face="Verdana" size="2" color="#000000">

<FORM name=form1  ACTION="javascript:" METHOD="POST">
<INPUT TYPE="text" NAME="url" size="25" value="http://hanmail.net" >
<br><INPUT TYPE="checkbox" NAME="tool"> Toolbar (툴바)
<br><INPUT TYPE="checkbox" NAME="loc_box"> Location (주소입력창)
<br><INPUT TYPE="checkbox" NAME="dir"> Directories (바로가기)
<br><INPUT TYPE="checkbox" NAME="stat"> Status (상태표시줄)
<br><INPUT TYPE="checkbox" NAME="menu"> Menubar (메뉴바)
<br><INPUT TYPE="checkbox" NAME="scroll"> Scrollbars (스크롤)
<br><INPUT TYPE="checkbox" NAME="resize"> Resizable (크기조정)
<br>
<br><INPUT TYPE="text"   NAME="wid" size="10" value="800" > Width
<br><INPUT TYPE="text"  NAME="heigh" size="10" value="600"> Height
<br>
<BR><CENTER>
<INPUT TYPE="button" VALUE="ENTER" OnClick="customize(this.form)">
<INPUT TYPE="reset" VALUE="RESET" onClick="clear(this.form)">
<br>
</font>

</center></TD></TR></TABLE>
</FORM>
</CENTER>
</body>
</html>
반응형