案例:HTML DOM案例     状态:可编辑再运行    进入横版
x
<input type="button" value="取消" onclick="makeUncheck(this.form)">
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function makeCheck(thisForm)
5
{
6
for (i = 0; i < thisForm.option.length; i++)
7
    {
8
    thisForm.option[i].checked=true
9
    }
10
}
11
12
function makeUncheck(thisForm)
13
{
14
for (i = 0; i < thisForm.option.length; i++)
15
    {
16
    thisForm.option[i].checked=false
17
    }
18
}
19
</script>
20
</head>
21
<body>
22
23
<form name="myForm">
24
<input type="button" value="选取" onclick="makeCheck(this.form)">

 运行结果 
 北美留学生论坛