<input type =checkBox id = SelectA name = SelectA VALUE=1 > <input type =checkBox id = SelectA name = SelectA VALUE=2 > <input type =checkBox id = SelectA name = SelectA VALUE=4 > <input type =checkBox id = SelectA name = SelectA VALUE=6 > <input type =checkBox id = SelectA name = SelectA VALUE=9 > <input type =checkBox id = SelectA name = SelectA VALUE=10 > <script language="JavaScript"> <!-- function Hid(){ var ochk = document.getElementsByName("SelectA"); for(var i = 0;i<ochk.length;i++) (ochk[i].value == 4) && (ochk[i].disabled = true) } //--> </script> <input type="button" value="禁用4" onclick="Hid()">
<input type =checkBox id = SelectA name = SelectA VALUE=1 >
<input type =checkBox id = SelectA name = SelectA VALUE=2 >
<input type =checkBox id = SelectA name = SelectA VALUE=4 >
<input type =checkBox id = SelectA name = SelectA VALUE=6 >
<input type =checkBox id = SelectA name = SelectA VALUE=9 >
<input type =checkBox id = SelectA name = SelectA VALUE=10 >
<script language="JavaScript">
<!--
function Hid(){
var ochk = document.getElementsByName("SelectA");
for(var i = 0;i<ochk.length;i++)
(ochk[i].value == 4) && (ochk[i].disabled = true) }
//-->
</script>
<input type="button" value="禁用4" onclick="Hid()">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<style type="text/css">
</style>
<script>
function lock(val){
var boxes = document.getElementsByTagName("input");
for(var n=0;n<boxes.length;n++){
if(boxes[n].type == 'checkbox'&&boxes[n].value == val) {
boxes[n].disabled = 'disabled';
}
}
}
</script>
</head>
<body>
<input type="checkbox" value="1" /><input type="checkbox" value="2" /><input type="checkbox" value="3" /><br />
<input type="button" value="disable值为1的" onclick="lock(1)" /><input type="button" value="disable值为1的" onclick="lock(2)" /><input type="button" value="disable值为1的" onclick="lock(3)" />
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<style type="text/css">
</style>
<script>
function lock(val){
var boxes = document.getElementsByName("selectA");
for(var n=0;n<boxes.length;n++){
if(boxes[n].value == val) {
boxes[n].disabled = 'disabled';
}
}
}
</script>
</head>
<body>
<input type="checkbox" name="selectA" value="1" /><input type="checkbox" name="selectA" value="2" /><input type="checkbox" name="selectA" value="3" /><br />
<input type="button" value="disable值为1的" onclick="lock(1)" /><input type="button" value="disable值为1的" onclick="lock(2)" /><input type="button" value="disable值为1的" onclick="lock(3)" />
</body>
</html>