首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

兑现自动添加的

2012-08-21 
实现自动添加的;htmlheadtitle自选添加/titlemeta http-equivContent-Type contenttext/htm

实现自动添加的;

<html>
<head>
<title>自选添加</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/type_css.css" rel="stylesheet"/>
<script language="javascript" src="js/airways.js"></script>
</head>

<body onLoad="this.document.qiksearch.select_items.selectedIndex = 4">

<center>
<table border=5 bordercolor=blue borderlight=green>
<tr><td align=center>
<div id="header">
<div onmouseout="hid_menu('menu_01');"><a href="#">homepage</a>
<ul id="menu_01">
<li><a href="#" onclick="return false">search package</a></li>
<li><a href="Modify.html" target="_blank">modify package</a></li>
<li><a href="Add Package.html" target="_new">Add package</a></li>
<li><a href="Delete Package.html" target="_new">Delete package</a></li>
</ul>
</li>
<li onmouseover="show_menu('menu_02');" onmouseout="hid_menu('menu_02');" ><a href="#"> package manage</a>
<ul id="menu_02">
<li><a href="#" onclick="return false">查询</a></li>
<li><a href="Modify.html" target="_blank">修改</a></li>
<li><a href="Add Package.html" target="_new">添加</a></li>
<li><a href="Delete Package.html" target="_new">查询</a></li>
</ul>
</li>
<li onmouseover="show_menu('menu_03');" onmouseout="hid_menu('menu_03');" ><a href="#"> package manage</a>
<ul id="menu_03">

</ul>
</li>
<li onmouseover="show_menu('menu_04');" onmouseout="hid_menu('menu_04');" ><a href="#"> package manage</a>
<ul id="menu_04">

</ul>
</li>
<li onmouseover="show_menu('menu_05');" onmouseout="hid_menu('menu_05');" ><a href="#"> package manage</a>
<ul id="menu_05">

</ul>
<li onmouseover="show_menu('menu_06');" onmouseout="hid_menu('menu_06');" ><a href="#"> package manage</a>
<ul id="menu_06">

</ul>
</li>
</li>
</ul>
</div>
</div>

</td></tr>
<tr><td align=left>
<script language="javascript">
var no_options;

document.write('<table cellspacing="5" cellpadding="5" align="center"><tr><td>');
document.write('<form name="qiksearch">');
if(navigator.appName=="Microsoft Internet Explorer"){
document.write('<div align="right"><font face="verdana,arial,helvetica" size="-1" color="#000000" align="right">添加<select name="select_items" onchange="javascript:showItems(this.document.qiksearch.select_items.value)" style="font-size:8pt;"></div>');
for(var i=1; i<=30; i++){
document.write('<option value="' + i + '">' + i + '</option>');
}
this.document.qiksearch.select_items.selectedIndex = 4;
document.write('</select> 个数<br><br>');
}

document.write('<div id="items">');/*循环出添加的个数*/
for(var i=1; i<=1; i++){
document.write('<table><tr><td>Package tour :</td><td><input type="text" size="20px" name="option' + i + '" style="height:20; border:1 solid #000000"> </td><td><p> Departure end date:</p></td><td><input type="text" size="20px" name="option' + i + '2" style="height:20; border:1 solid #000000" /></td><td>Departure city code :</td><td><input type="text" name="linkto' + i + '2" size="20" /></td></tr><tr><td>Package type :</td><td><input type="text" size="20px" name="option' + i + '" style="height:20; border:1 solid #000000"> </td><td>Departure start date:</td><td><input type="text" size="20px" name="option' + i + '2" style="height:20; border:1 solid #000000" /></td><td>Destination city code:</td><td><input type="text" name="linkto' + i + '2" size="20" /></td></tr><tr><td>Package status:</td><td><input type="text" size="20px" name="option' + i + '" style="height:20; border:1 solid #000000"> </td><td>Sale start date:</td><td><input type="text" size="20px" name="option' + i + '2" style="height:20; border:1 solid #000000" /></td><td>Hotel codes :</td><td><input type="text" name="linkto' + i + '2" size="20" /></td></tr><tr><td>Asiamiles :</td><td><input type="text" size="20px" name="option' + i + '" style="height:20; border:1 solid #000000"> </td><td> Sale end date:</td><td><input type="text" size="20px" name="option' + i + '2" style="height:20; border:1 solid #000000" /></td><td>Min adult share tein :</td><td><input type="text" name="222' + i + '2" size="20" /></td></tr><tr><td height="23" colspan="6"><hr /></td></tr></table>');
}/**/
/*测试table
document.write('<table><tr><td width="89">Package tour :</td><td><input type="text" size="20px" name="option' + i + '" style="height:20; border:1 solid #000000"></td><td> Departure end date:</td><td><input type="text" size="20px" name="option' + i + '" style="height:20; border:1 solid #000000"></td><td width="142">Departure city code :</td><td><input type="text" name="linkto' + i + '" size="20" ></td></tr></table>');*/
document.write('</div>');
document.write('<align="right"><input type="reset" onclick="javascript:location.reload();" style="font-family:verdana,arial,helvetica; font-size:8pt; height:20; width:48px; background:#EFEFEF; border:1 solid #808080; cursor:hand"></center>');//重置按钮
document.write('</font></form>');

document.write('</td></tr></table>');

function showItems(n){/*循环指定个数*/
var item_disp = "";
for(var i=0; i<n; i++){
item_disp += '<table><tr><td>Package tour :</td><td><input type="text" size="20" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"></td><td><p> Departure end date:</p></td><td><input type="text" size="20" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"></td><td>Departure city code :</td><td><input type="text" name="linkto' + (i+1) + '" size="20" style="height:20; border:1 solid #000000"></td></tr><tr><td>Package type :</td><td><input type="text" size="20" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"></td><td>Departure start date:</td><td><input type="text" size="20" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"></td><td>Destination city code:</td><td><input type="text" name="linkto' + (i+1) + '" size="20" style="height:20; border:1 solid #000000"></td></tr><tr><td>Package status:</td><td><input type="text" size="20" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"></td><td>Sale start date:</td><td><input type="text" size="20" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"></td><td>Hotel codes :</td><td><input type="text" name="linkto' + (i+1) + '" size="20" style="height:20; border:1 solid #000000"></td></tr><tr><td>Asiamiles :</td><td><input type="text" size="20" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"></td><td> Sale end date:</td><td><input type="text" size="20" name="option' + (i+1) + '" style="height:20; border:1 solid #000000"></td><td>Min adult share tein :</td><td><input type="text" name="linkto' + (i+1) + '" size="20" style="height:20; border:1 solid #000000"></td></tr><tr><td height="23" colspan="6"><hr /></td></tr></table>';
}
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 = 1;
}

function display() {
DispWin=window.open('','NewWin','toolbar=no,status=no,width=960,height=375')
message="<font face=arial,verdana,helvetica size=-2 color=#000000><b>&lt;!--Made with Qiksearch MenuGen--&gt;";
message += "<br>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;";
message += "<br>function go()";
message += "<br>{";
message += "<br>&nbsp;if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != &quot;none&quot;)";
message += "<br>&nbsp;{";
message += "<br>&nbsp;&nbsp;location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value";
message += "<br>&nbsp;}";
message += "<br>}";
message += "<br>&lt;/script&gt;";
message += "<br>";
message += "<br>&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;";
message += "<br>document.write('&lt;form name=&quot;selecter&quot;&gt;&lt;select name=&quot;select1&quot;&gt;');";
message += "<br>document.write('&lt;option value=none&gt;" + this.document.qiksearch.combo_caption.value + "&lt;/option&gt;');";
message += "<br>document.write('&lt;option value=none&gt;--------------------&lt;/option&gt;');";
for(var i=1; i<=no_options; i++){
message += "<br>document.write('&lt;option value=&quot;" + eval('this.document.qiksearch.linkto' + i + '.value') + "&quot;&gt;" + eval('this.document.qiksearch.option' + i + '.value') + "&lt;/option&gt;');";
}
message += "<br>document.write('&lt;/select&gt;');";
message += "<br>document.write('&lt;input type=&quot;button&quot; value=&quot;Go&quot; onclick=&quot;go()&quot;&gt;');";
message += "<br>document.write('&lt;/form&gt;');";
message += "<br>&lt;/script&gt;";

DispWin.document.write(message);
}


</script>
<div id="footer">
<div onClick="return false">about us</a> | <a href="#" onClick="return false">content</a> | <a href="#" onClick="return false">FAQ</a> | <a href="#" onClick="return false">Equire</a> | <a href="#" onClick="return false">Copyright and Disclaimr</a></div>
</div>
</td></tr>
</table></center>

</body>
</html>

热点排行