案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function check()
5
  {
6
  document.getElementById("radio1").checked=true
7
  }
8
function uncheck()
9
  {
10
  document.getElementById("radio1").checked=false
11
  }
12
</script>
13
</head>
14
<body>
15
16
<form>
17
<input type="radio" id="radio1" />
18
<input type="button" onclick="check()" value="Check radio button" />
19
<input type="button" onclick="uncheck()" value="Uncheck radio button" />
20
</form>
21
22
</body>
23
</html>
24