<html>
<head>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
</head>
<body>
Check Uncheck All In Section 1 <input id="DE-all-checkboxes" type="checkbox"/>
<div id="section1">
Section 1:
<input type="checkbox"/>
<input type="checkbox"/>
<input type="checkbox"/>
<input type="checkbox"/>
<input type="checkbox"/>
</div>
<div id="section2">
Section 2:
<input type="checkbox"/>
<input type="checkbox"/>
<input type="checkbox"/>
<input type="checkbox"/>
<input type="checkbox"/>
</div>
<script>
$("#DE-all-checkboxes").change(function() {
$("#section1 > input:checkbox").prop('checked', $(this).prop("checked"));
});
</script>
</body>
</html>
顯示你的HTML代碼 – ricky
(https://jsfiddle.net/9ukgw44n/1/) – Teemu