<!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>
<title></title>
<script src="jquery-1.7.1.js" type="text/javascript"></script>
<script type="text/javascript">
function checkAll() {
$(":checkbox").attr("checked","true");
}
function uncheckAll() {
$(":checkbox").each(function(){
this.checked=false;
})
}
</script>
</head>
<body>
<input type="checkbox" id="in1" />Jquery<br />
<input type="checkbox" id="in2" />JavaScript<br />
<input type="checkbox" id="in3" />ADO.net<br />
<p>
<input type="button" name="checkAll" value="全选" onclick="checkAll()" />
<input type="button" name="uncheckAll" value="取消全选" onclick="uncheckAll()" />
</p>
</body>
</html>