jquery attr()方法获取标签的 checked 会有问题,所以用了 prop() 方法。
Hml的checkbox没有加name,只用了 p 嵌套。
如有更好的方法,望指点!!
<p align="center"> <p id="box"> <input type="checkbox" value="1">西瓜 <input type="checkbox" value="2">芒果 <input type="checkbox" value="3">橙 <input type="checkbox" value="4">山竹 <input type="checkbox" value="5">草莓 <input type="checkbox" value="6">火龙果 </p> <br> <input type="checkbox" id="allChecked">全选 <input type="checkbox" id="invertChecked">反选 <input type="checkbox" id="orChecked">全选/反选/全不选 </p>
Copyright © 2019- guangdonghui.cc 版权所有
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务