ラジオボタンの状態を設定する
		
			
説明
			ラジオボタンの状態を設定するにはinputタグのcheckedプロパティにtrueまたはfalseを設定します。trueを指定するとチェックされfalseを入れるとチェックが外れます。同名グループのラジオボタンでは、どれか1つをtrueに設定するとグループ内の他のラジオボタンはfalseに設定されます。
		
		
			
サンプルプログラム
			<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
			<html lang="ja">
			 <head>
			  <meta http-equiv="content-type" content="text/html;charset=utf-8">
			  <title>Sample</title>
			  <link rel="stylesheet" href="css/main.css" type="text/css" media="all">
			  <script type="text/javascript" src="js/sample.js"></script>
			 </head>
			 <body>
			  <h1>ラジオボタンの状態を設定する</h1>
			  <form method="get" action="./regist.cgi" id="aForm">
			   <input type="radio" name="sType">男<br>
			   <input type="radio" name="sType">女<br>
			   <input type="button" value="状態を設定する" id="setButton">
			  </form>
			 </body>
			</html>
			【スクリプト】
			window.onload = function(){
			 document.getElementById("setButton").onclick = function(){
			  document.getElementsByName("sType")[0].checked = true;
			 }
			}