| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1044 人关注过本帖
标题:[求助]如何把enabled灰白,使其不能修改
只看楼主 加入收藏
xiaoyihu
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-9-10
收藏
 问题点数:0 回复次数:6 
[求助]如何把enabled灰白,使其不能修改

请教各位,谢谢帮忙!!!!!!!!!
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);
}
}
}

搜索更多相关主题的帖子: 灰白 enabled div table 
2007-09-25 09:20
lmhllr
Rank: 8Rank: 8
等 级:贵宾
威 望:44
帖 子:1504
专家分:42
注 册:2005-5-12
收藏
得分:0 
不知道问的啥?

是不是让文本框只能看不能修改啊?那用readonly
2007-09-25 12:43
xiaoyihu
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-9-10
收藏
得分:0 

是把select name="wlWep" onChange='encrypChange()' select控件后的enabled灰白

2007-09-25 13:34
lmhllr
Rank: 8Rank: 8
等 级:贵宾
威 望:44
帖 子:1504
专家分:42
注 册:2005-5-12
收藏
得分:0 
超出理解范围。。。等待高手。。。
2007-09-25 14:50
bomb_2002
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2006-12-14
收藏
得分:0 
不明白你说的什么!!!

一条马路,越走越宽,最后不知道前进的方向! 《妈妈宝宝》杂志社(www.
2007-10-01 01:03
zhulei1978
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:53
帖 子:1351
专家分:1200
注 册:2006-12-17
收藏
得分:0 
不太明白

其实我就是改变社会风气,提高少女素质,刺激电影市道,提高年轻人内涵,玉树临风,风度翩翩的整蛊专家,我名叫古晶,英文名叫JingKoo!
2007-10-02 19:16
advancant
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2007-10-4
收藏
得分:0 
getSelect和showhide函数是干什么用的
2007-10-06 00:06
快速回复:[求助]如何把enabled灰白,使其不能修改
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017887 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved