主题:[讨论]该页面上的脚本造成lnternet Explorer运行速度缓慢
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
<!--
body
{
font-size:12px;
}
.txtStyle{width:100px;
height:20px;
border-bottom: dashed 1px #999999;
border-left:none;
border-right:none;
border-top:none;}
.txtStyle120{
width:120px;
height:20px;
border-bottom: dashed 1px #999999;
border-left:none;
border-right:none;
border-top:none;}
.txtStyle150{width:150px;
border-bottom: dashed 1px #999999;
border-left:none;
border-right:none;
border-top:none;}
.txtStyle20{width:20px;
height:20px;
border-bottom: none;
border-left:none;
border-right:none;
border-top:none;}
-->
</style>
<script language="javascript" type="text/javascript">
var Subval2 = new Array();
Subval2[0] = new Array('4','16','24')
Subval2[1] = new Array('5','16','24')
Subval2[2] = new Array('6','16','24')
Subval2[3] = new Array('8','17','25')
Subval2[4] = new Array('9','17','24')
Subval2[5] = new Array('10','18','31')
Subval2[6] = new Array('13','17','31')
Subval2[7] = new Array('14','17','31')
Subval2[8] = new Array('15','17','31')
Subval2[9] = new Array('16','18','25')
Subval2[10] = new Array('17','19','24')
Subval2[11] = new Array('18','20','24')
Subval2[12] = new Array('19','17','24')
Subval2[13] = new Array('20','16','31')
Subval2[14] = new Array('21','16','31')
Subval2[15] = new Array('26','18','24')
Subval2[16] = new Array('27','18','24')
Subval2[17] = new Array('28','17','31')
Subval2[18] = new Array('29','18','31')
Subval2[19] = new Array('30','18','31')
Subval2[20] = new Array('31','18','31')
Subval2[21] = new Array('32','18','31')
Subval2[22] = new Array('33','18','31')
Subval2[23] = new Array('34','18','31')
Subval2[24] = new Array('35','18','31')
Subval2[25] = new Array('36','16','26')
Subval2[26] = new Array('37','16','36')
Subval2[27] = new Array('38','16','36')
Subval2[28] = new Array('42','17','31')
Subval2[29] = new Array('43','16','31')
Subval2[30] = new Array('44','16','31')
Subval2[31] = new Array('45','16','24')
Subval2[32] = new Array('46','16','24')
Subval2[33] = new Array('47','16','24')
Subval2[34] = new Array('48','16','24')
var Subval3 = new Array();
//数组结构:一级根值,二级根值,二级显示值
Subval3[0] = new Array('5','31','412')
Subval3[1] = new Array('6','20','985')
Subval3[2] = new Array('7','10','440')
Subval3[3] = new Array('8','36','465')
Subval3[4] = new Array('9','33','498')
Subval3[5] = new Array('10','28','500')
Subval3[6] = new Array('11','30','0')
Subval3[7] = new Array('12','34','500')
Subval3[8] = new Array('13','35','500')
Subval3[9] = new Array('14','14','400')
Subval3[10] = new Array('15','15','500')
Subval3[11] = new Array('16','5','560')
Subval3[12] = new Array('17','6','0')
Subval3[13] = new Array('18','21','20')
Subval3[14] = new Array('19','13','300')
Subval3[15] = new Array('20','44','948')
Subval3[16] = new Array('21','43','900')
Subval3[17] = new Array('22','48','500')
Subval3[18] = new Array('23','47','600')
Subval3[19] = new Array('24','46','300')
var Subval4 = new Array();
Subval4[0] = new Array('7','李光庆')
Subval4[1] = new Array('8','张健伟')
Subval4[2] = new Array('9','钟军胜')
Subval4[3] = new Array('10','肖新轮')
Subval4[4] = new Array('16','仓库A')
Subval4[5] = new Array('17','仓库B')
Subval4[6] = new Array('18','仓库C')
Subval4[7] = new Array('19','仓库D')
Subval4[8] = new Array('20','杨镇鑫')
Subval4[9] = new Array('21','莱斯')
Subval4[10] = new Array('22','粤北技校')
Subval4[11] = new Array('23','杨ZZ')
Subval4[12] = new Array('24','米')
Subval4[13] = new Array('25','台')
Subval4[14] = new Array('26','包')
Subval4[15] = new Array('27','盒')
Subval4[16] = new Array('28','套')
Subval4[17] = new Array('29','个')
Subval4[18] = new Array('30','南天豪庭')
Subval4[19] = new Array('31','根')
Subval4[20] = new Array('32','鸿振')
Subval4[21] = new Array('33','只')
Subval4[22] = new Array('34','天子岭[二期]')
Subval4[23] = new Array('35','蓉山·翡翠湾')
Subval4[24] = new Array('36','把')
//
function Selected(locationid)
{
for (i=0; i<Subval2.length; i++)
{
if (Subval2[i][0] == locationid)
{
GetShareData(Subval2[i][2],Subval2[i][1]);
}
}
//document.form.Count.value = 0 ;
for (i=0; i<Subval3.length; i++)
{
if (Subval3[i][1] == locationid)
{
if(Subval3[i][2] <= 0 )
{
document.form.Count.value=Subval3[i][2];
document.form.AddButton.disabled = true;
}
else
{
document.form.Count.value=Subval3[i][2];
document.form.AddButton.disabled = false;
}
}
}
}
//
function GetShareData(dataID,StuffID)
{
for (i=0; i<Subval4.length; i++)
{
if (Subval4[i][0] == dataID)
{
document.form.Unit.value= Subval4[i][1];
document.form.Unit2.value = document.form.Unit.value;
}
if (Subval4[i][0] == StuffID)
{
document.form.DepotId.value= Subval4[i][1];
}
}
}
</script>
</head>
<body>
<form action="" name="form" method="post">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="21%" height="30">材料:
<select name="ClassID" onChange="Selected(this.value)">
<option value="">--=请选择=--</option>
<option value="45">├电线</option><option value="48">│ ├白线8mm</option><option value="47">│ ├红线10mm</option><option value="46">│ ├蓝线10mm</option><option value="36">├焊条</option><option value="27">├热镀锌扁铁</option><option value="32">│ ├40*4</option><option value="35">│ │ ├2 m</option><option value="34">│ │ ├1.5 m</option><option value="33">│ │ ├0.5 m</option><option value="26">├扁铁</option><option value="29">│ ├20*4</option><option value="31">│ │ ├0.8 m</option><option value="30">│ │ ├1.5 m</option><option value="9">├角钢</option><option value="10">│ ├40*4*50</option><option value="8">├热镀锌圆钢</option><option value="15">│ ├Φ14</option><option value="14">│ ├Φ12</option><option value="42">├2.0m</option><option value="13">│ ├Φ10</option><option value="28">│ │ ├0.1 M</option><option value="4">├圆钢</option><option value="6">│ ├Φ10</option><option value="21">│ │ ├1.5 m</option><option value="20">│ │ ├0.33 m</option><option value="5">│ ├Φ12</option><option value="44">│ │ ├1.0m</option><option value="43">│ │ ├2.0m</option>
</select></td>
<td width="25%">出库数量:
<input name="Amount" type="text" class="txtStyle" id="Amount">
<input name="Unit" type="text" class="txtStyle20" id="Unit"></td>
<td width="23%">库存量:
<input name="Count" type="text" class="txtStyle" id="Count" disabled>
<input name="Unit2" type="text" class="txtStyle20" id="Unit2"></td>
<td width="25%">存放仓库:
<input name="DepotId" type="text" class="txtStyle" id="DepotId" disabled></td>
</tr>
</table>
</form>
</body>
</html>