效果图如下:
html
<input type='checkbox' name='checkName' onclick="countNum()"/>橙子<br/>
<input type='checkbox' name='checkName' onclick="countNum()" />柚子<br/>
<input type='checkbox' name='checkName' onclick="countNum()" />猕猴桃<br/>
<input type='checkbox' name='checkName' onclick="countNum()" />葡萄<br/>
<div id="con" onclick="checkbox()">全选</div> <div style="