<html>
<head>
<title>myTest</title>
<script type="text/javascript">
function jump(obj)
{
var a = document.myform.sun;
for (i = 0;i<a.length;i++)
{
var b = a[i];
b.checked =obj.checked;
}
}
</script>
</head>
<body>
<form action="" method="post" name="myform">
<table>
<tr>
<td><input type="checkbox" name="father" οnclick="jump(this)" >ȫѡ<td>
</tr>
<tr>
<td><input type="checkbox" name="sun" value="1">1</td>
</tr>
<tr>
<td><input type="checkbox" name="sun" value="2" >2</td>
</tr>
<tr>
<td><input type="checkbox" name="sun" value="3">3</td>
</tr>
</table>
</form>
</body>
</html>
批量选择js
最新推荐文章于 2021-08-10 10:11:49 发布