<html>
<head>
<meta charset="utf-8">
<script src="jquery-1.7.2.js"></script>
</head>
<body>
<br/><br/>
<button id="one">全部选中/全部取消</button>
<br/><br/><br/>
<form>
<input type="checkbox"/>时间
<input type="checkbox"/>金钱
<input type="checkbox"/>生命
<input type="checkbox"/>未来
<input type="checkbox"/>现在
<input type="checkbox"/>过去
</form>
<br/><br/>
</body>
<script>
var i=false;
$("#one").click(function () {
if(i){
$("input:checkbox").attr("checked",false);
i=false;
}else{
$("input:checkbox").attr("checked",true);
i=true;
}
});
</script>
</html>