案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function clickCheckbox()
5
  {
6
  document.getElementById('check1').click()
7
  }
8
</script>
9
</head>
10
<body>
11
12
<form>
13
<input type="checkbox" id="check1" />
14
<br />
15
<input type="button" onclick="clickCheckbox()" value="Click checkbox" />
16
</form>
17
18
</body>
19
</html>
20