欢迎来到山村网

jquery实现全选、反选

2019-03-02 11:21:38浏览:796 来源:山村网   
核心摘要:1script src=http://www.shancun.net/skin/default/image/nopic.gif ? 12345678910111213141516171819202122232425$(document).r
1 <script src=http://www.shancun.net/skin/default/image/nopic.gif ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 $(document).ready(function() { $("#selectAll").click(function() { $("input[name='subBox']").each(function() { this.checked = true; }); }); $("#reverse").click(function() { $("input[name='subBox']").each(function() { if (this.checked) { this.checked = false; } else { this.checked = true; } }); }); $("#checkItems").click(function() { $("input[name='subBox']").each(function() { if (this.checked) { this.checked = false; } else { this.checked = true; } }); }); }); ? 1 2 3 <input type="checkbox" id="checkItems"> 全选 反选 ? 1 2 <input type="checkbox" name="subBox" value="">
(责任编辑:豆豆)
下一篇:

Python中的几种数据类型

上一篇:

python 3快速入门之模块化和类

  • 信息二维码

    手机看新闻

  • 分享到
打赏
免责声明
• 
本文仅代表作者个人观点,本站未对其内容进行核实,请读者仅做参考,如若文中涉及有违公德、触犯法律的内容,一经发现,立即删除,作者需自行承担相应责任。涉及到版权或其他问题,请及时联系我们 xfptx@outlook.com