<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="jQuery_min.js" type="text/javascript"></script>
<script type="text/javascript">
function hh(a){
//var items = document.getElementsByTagName("input");
$("input[type=checkbox]").each(function(){this.checked = a.checked;});
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<input type="checkbox" name="checkbox" id="checkbox" />
</label>
<input type="checkbox" name="checkbox1" id="checkbox" />
<input type="checkbox" name="checkbox2" id="checkbox" />
<input type="checkbox" name="checkbox3" id="checkbox" />
<input type="checkbox" name="checkbox4" id="checkbox" />
</form>
<a href="javascript:" οnclick="hh()">click</a>
<input type="checkbox" name="checkbox4" οnclick="hh(this)" id="checkbox" />
</body>
</html>