チェックボックス一括チェック

jqueryを使ったやり方。

<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
</head>

<body>
<input type="checkbox" id="checkbox_all" onclick="$('input[type=checkbox][name=toggle]').attr('checked', $('#checkbox_all').attr('checked'));" /><br>
<input type="checkbox" name="toggle" value="1"><br>
<input type="checkbox" name="toggle" value="2"><br>
<input type="checkbox" name="toggle" value="3"><br>
</body>
</html>