.<HTML>
<HEAD><title>콤보메뉴 만들기</title><style>
</style></HEAD>
<p><center><table width="100%" height="30%" border="0" cellspacing="0" cellpadding="0" align="center"><tr>
<td align="center" valign="middle">
<font face="Verdana"><span style="font-size:9pt;"><SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var no_options;
document.write('<table cellspacing="5" cellpadding="5" style="border:2 solid #808080" align="center"><tr><td>');
document.write('<form name="qiksearch">');
if(navigator.appName=="Microsoft Internet Explorer")
{
document.write('<font face="verdana,arial,helvetica" size="-1" color="#000000">바로가기 링크 갯수 <select name="select_items" onchange="javascript:showItems(this.document.qiksearch.select_items.value)" style="font-size:8pt">');
for(var i=1; i<=30; i++)
{
document.write('<option value="' + i + '">' + i + '</option>');
}
this.document.qiksearch.select_items.selectedIndex = 4;
document.write('</select> links.<br><br>');
}
document.write('<b>Combo Box 문구 :</b><br><br>');
document.write('<input type="text" value="Select me" name="combo_caption" size="30" style="height:20; border:1 solid #000000">');
document.write('<br><br><b>Combo Items :</b><br><br>');
document.write('<div id="items">');
for(var i=1; i<=5; i++)
{
document.write('Option : <input type="text" size="12" name="option' + i + '" style="height:20; border:1 solid #000000"> Link to : <input type="file" name="linkto' + i + '" size="15" style="height:20; border:1 solid #000000"><br>');
}
document.write('</div>');
document.write('<br><br><center><input type="button" name="qiksearch_submit" value="코드 생성" onclick="display()" style="font-family:verdana,arial,helvetica; font-size:8pt; height:20; width:48%; background:#EFEFEF; border:1 solid #808080; cursor:hand"> <input type="reset" onclick="javascript:location.reload();" style="font-family:verdana,arial,helvetica; font-size:8pt; height:20; width:48%; background:#EFEFEF; border:1 solid #808080; cursor:hand"></center>');
document.write('<br></td></tr></table>');
function showItems(n)
{
var item_disp = "";
for(var i=0; i<n; i++)
{
item_disp += 'Option : <input type="text" size="12" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"> Link to : <input type="file" name="linkto' + (i+1) + '" size="15" style="height:20; border:1 solid #000000"><br>';
}
no_options=n;
this.document.all.items.innerHTML = item_disp;
}
if(navigator.appName=="Microsoft Internet Explorer")
{
no_options = this.document.qiksearch.select_items.value;
}
else
{
no_options = 5;
}
function display() {
DispWin=window.open('','NewWin',
'toolbar=no,status=no,width=500,height=375')
message="<font face=arial,verdana,helvetica size=-2 color=#000000><b>";
message += "<br><script language="javascript" type="text/javascript">";
message += "<br>function go()";
message += "<br>{";
message += "<br> if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none")";
message += "<br> {";
message += "<br> location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value";
message += "<br> }";
message += "<br>}";
message += "<br></script>";
message += "<br>";
message += "<br><script language="JavaScript" type="text/javascript">";
message += "<br>document.write('<form name="selecter"><select name="select1">');";
message += "<br>document.write('<option value=none>" + this.document.qiksearch.combo_caption.value + "</option>');";
message += "<br>document.write('<option value=none>--------------------</option>');";
for(var i=1; i<=no_options; i++)
{
message += "<br>document.write('<option value="" + eval('this.document.qiksearch.linkto' + i + '.value') + "">" + eval('this.document.qiksearch.option' + i + '.value') + "</option>');";
}
message += "<br>document.write('</select>');";
message += "<br>document.write('<input type="button" value="Go" onclick="go()">');";
message += "<br>document.write('</form>');";
message += "<br></script>";
DispWin.document.write(message);
}
// End -->
</script>
</span></font></td></tr></table>
<center><SCRIPT LANGUAGE="JavaScript">
<!--
function sourceopen() {
var This_URL = "";
This_URL = document.location;
window.location = "view-source:"+This_URL;
}
-->
</SCRIPT>
<p><INPUT TYPE=button NAME="source" value="소스보기" onClick="sourceopen()" style="color:rgb(255,0,102); background-
</body></html>
'Html & Css' 카테고리의 다른 글
콤보메뉴 마법사 (0) | 2016.06.03 |
---|---|
깔끔한 테이블시계 (0) | 2016.06.03 |
한번에 폰트크기 지정하기 (1) | 2016.06.03 |
칼라 셀렉트 폼 (0) | 2016.06.03 |
기대수명 계산기 (1486) | 2016.06.03 |