チェックボックスの状態を設定する
		
			
説明
			チェックボックスの状態を設定するにはinputタグのcheckedプロパティにtrueまたはfalseを設定します。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="checkbox" name="mac" id="mac" value="mac">MacOS X<br>
			   <input type="checkbox" name="unix" id="unix" value="unix">UNIX (Linux/Free BSD)<br>
			   <input type="checkbox" name="windows" id="windows" value="windows">Windows<br>
			   <input type="button" value="状態を設定する" id="setButton">
			  </form>
			 </body>
			</html>
			【スクリプト】
			window.onload = function(){
			 document.getElementById("setButton").onclick = function(){
			  document.getElementById("mac").checked = true;
			  document.getElementById("unix").checked = true;
			  document.getElementById("windows").checked = false;
			 }
			}