请教各位,谢谢帮忙!!!!!!!!!
html代码
<div id="wlWepD"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width='180'>WEP Encryption:</td>
<td><select name="wlWep" onChange='encrypChange()'>
</select>
</td>
</tr>
</table>
</div>
<div id='keyInfo'>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width='180'>Encryption Strength:</td>
<td><select name='wlKeyBit' size='1'>
<option value="0" selected>128-bit</option>
<option value="1">64-bit</option>
</select></td>
</tr>
<tr>
<td width='180'>Current Network Key:</td>
<td><select name='wlKeyIndex' size='1'></select></td>
</tr>
<tr>
<td>Network Key 1:</td>
<td><input type='text' name='wlKeys' size='30' maxlength=26></td>
</tr>
<tr>
<td>Network Key 2:</td>
<td><input type='text' name='wlKeys' size='30' maxlength=26></td>
</tr>
<tr>
<td>Network Key 3:</td>
<td><input type='text' name='wlKeys' size='30' maxlength=26></td>
</tr>
<tr>
<td>Network Key 4:</td>
<td><input type='text' name='wlKeys' size='30' maxlength=26></td>
</tr>
JavaScript代码
function encrypChange()
{
with ( document.forms[0] ) {
var cwep = getSelect(wlWep);
var authMode = getSelect(wlAuthMode)
if (cwep == "enabled") {
showhide("keyInfo", 1);
if (authMode != "open" && authMode != "shared") {
wlKeys[0].disabled = 1;
wlKeys[1].disabled = 0;
wlKeys[2].disabled = 0;
wlKeys[3].disabled = 1;
wlKeyIndex.length = 0;
wlKeyIndex[0] = new Option("2", "2");
wlKeyIndex[1] = new Option("3", "3");
if (keyIdx != "2" && keyIdx != "3") {
keyIdx = "2";
}
wlKeyIndex.selectedIndex = parseInt(keyIdx) - 2;
}
else {
wlKeys[0].disabled = 0;
wlKeys[1].disabled = 0;
wlKeys[2].disabled = 0;
wlKeys[3].disabled = 0;
wlKeyIndex.length = 0;
wlKeyIndex[0] = new Option("1", "1");
wlKeyIndex[1] = new Option("2", "2");
wlKeyIndex[2] = new Option("3", "3");
wlKeyIndex[3] = new Option("4", "4");
wlKeyIndex.selectedIndex = parseInt(keyIdx) - 1;
}
}
else {
showhide("keyInfo", 0);
}
}
}