
ÇØ´ç ¼±Åðú ÀÔ·Â ÈÄ »õ·Î¿î âÀ» ¿¾î º¸¶ó.

<head>
<script Language="Javascript">
<!-- °¨Ãã
var winopen=0; // »õ âÀÌ ¿·Á Àִ°¡ ?
function act(msg) {
if (winopen) newWin.close();
// window option ¼³Á¤============================
val=(fname.stoolbar(0).checked ) ? 'yes':'no' // ù¹øÀÌ ¼±ÅõǾúÀ¸¸é yes ¾Æ´Ï¸é no
stats='toolbar=' + val + ',';
// °£´ÜÈ÷ ÁÙÀ̸é
stats+='location=' + ((fname.slocation(0).checked) ? 'yes':'no') + ',';
stats+='directories=' + ((fname.sdirectories(0).checked) ? 'yes':'no') + ',';
stats+='status=' + ((fname.sstatus(0).checked) ? 'yes':'no') + ',';
stats+='menubar=' + ((fname.smenubar(0).checked) ? 'yes':'no') + ',';
stats+='scrollbars='+ document.fname.sscrollbars.value + ','; // radio box¿¡¼ ¼±ÅÃ
stats+='resizable='+ document.fname.sresizable.value + ',';
w=document.fname.swidth.value; // width ¼³Á¤
if (w<100) w=100;
if (w>900) w=900;
document.fname.swidth.value=w;
stats+='width='+ w + ',';
h=document.fname.sheight.value; // height ¼³Á¤
if (h<100) h=100;
if (h>700) h=700;
document.fname.sheight.value=h;
stats+='height='+ h +',';
x=document.fname.xpos.value; // x ÁÂÇ¥ ¼³Á¤
if (x<0) x=0;
if (x>400) x=400;
document.fname.xpos.value=x;
stats+='top='+ x + ',';
y=document.fname.ypos.value; // y ÁÂÇ¥ ¼³Á¤
if (y<0) y=0;
if (y>500) y=500;
document.fname.ypos.value=y;
stats+='left='+ y;
newWin = window.open ('','msg',stats); // window ¿±â
newWin.document.write('<body bgColor="darkgreen" text="yellow">');
newWin.document.write('<center><h5>',msg,'</h5>');
newWin.document.write('<div title="stats string">stats=\"<br>');
showstatus(stats);
newWin.document.write('<br>\"</div><form>');
newWin.document.write('<input type="button" value="´Ý±â" onClick="self.close()">');
newWin.document.write('</form>');
winopen=1; // âÀÌ ¿·Á Àִٴ ǥ½Ã
}
function checkwidth(w){
msg='width¸¦ 100-900 »çÀÌ·Î Ç϶ó.'; // ³Ê¹« À۰ųª Å« ³Êºñ ¹èÁ¦
if(w<100){
alert(msg);
document.fname.swidth.value=100;
document.fname.swidth.focus();
}else if (w>900){
alert(msg);
document.fname.swidth.value=900;
document.fname.swidth.focus();
}
}
function checkheight(h){
msg='height¸¦ 100-700 »çÀÌ·Î Ç϶ó.';
if(h<100){
alert(msg);
document.fname.sheight.value=100;
document.fname.sheight.focus();
}else if (h>700){
alert(msg);
document.fname.sheight.value=700;
document.fname.sheight.focus();
}
}
function checkxpos(x){
msg='topÀ» 0-400 »çÀÌ·Î Ç϶ó.';
if(x<0){
alert(msg);
document.fname.xpos.value=0;
document.fname.xpos.focus();
}else if (x>400){
alert(msg);
document.fname.xpos.value=400;
document.fname.xpos.focus();
}
}
function checkheight(y){
msg='left¸¦ height¸¦ 0-500 »çÀÌ·Î Ç϶ó.';
if(y<0){
alert(msg);
document.fname.ypos.value=0;
document.fname.ypos.focus();
}else if (y>500){
alert(msg);
document.fname.ypos.value=500;
document.fname.ypos.focus();
}
}
function closeWin(){
if (winopen=1) newWin.close();
winopen=0;
}
function showstatus(stats){
for (i=0;i<stats.length;i++){
char=stats.substring(i,i+1);
if (char=='=') newWin.document.write(' ');
newWin.document.write(char);
if (char=='=') newWin.document.write(' ');
if (char==',') newWin.document.write('<br>');
}
}
// °¨Ãã ³¡ -->
</head>
<body>
ÇØ´ç ¼±Åðú ÀÔ·Â ÈÄ »õ·Î¿î âÀ» ¿¾î º¸¶ó.
<form name="fname">
<div class=std>toolbar:
<input type="radio" checked name="stoolbar" value="yes">yes
<input type="radio" name="stoolbar" value="no">no
</div>
<div class=std>location:
<input type="radio" name="slocation" checked value="yes">yes
<input type="radio" name="slocation" value="no">no
</div>
<div class=std>directories:
<input type="radio" name="sdirectories" value="yes">yes
<input type="radio" name="sdirectories" checked value="no">no
</div>
<div class=std>status:
<input type="radio" name="sstatus" checked value="yes">yes
<input type="radio" name="sstatus" value="no">no
</div>
<div class=std>menubar:
<input type="radio" name="smenubar" checked value="yes">yes
<input type="radio" name="smenubar" value="no">no
</div>
<div class=std>scrollbars:
<select name="sscrollbars">
<option selected value="yes">yes
<option value="no">no
</select>
resizable:
<select name="sresizable">
<option selected value="yes">yes
<option value="no">no
</select>
</div>
<div class=std>width:
<input name="swidth" value="600" size=3 OnMouseOut="checkwidth(this.value)">
<span class=brown>(100-900)</span>
</div>
<div class=std>height:
<input name="sheight" value=400 size=3 OnMouseOut="checkheight(this.value)">
<span class=brown>(100-700)</span>
</div>
<div class=std>top:
<input name="xpos" value="100" size=3 OnMouseOut="checkxpos(this.value)">
<span class=brown>(0-400)</span>
</div>
<div class=std>left:
<input name="ypos" value=100 size=3 OnMouseOut="checkypos(this.value)">
<span class=brown>(0-500)</span>
</div>
<div class=std>
<input type="button" value=" »õ â ¿ ±â "
onClick="act('»õ·Î¿î â¿¡ º¸ÀÏ ¸Þ¼¼Áö')">
<input type="reset" value="ÃʱⰪÀ¸·Î ȯ¿ø">
</div>
</form>
Áß¿ä »çÇ×
- »õ·Î¿î â ¿±â
- »õ·Î¿î â Ư¼º ÁöÁ¤: Äĸ¶(,)·Î ºÐ¸®µÈ´Ù.
- ´ÜÃß·Î ÀÚü ⠴ݱâ, ÇÁ·Î±×·¥»ó ´Ù¸¥ ⠴ݱâ
|