首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

jquery兑现全选

2012-09-09 
jquery实现全选input typecheckbox nameindexed idall/ brinput typecheckbox nameind

jquery实现全选

<input type="checkbox" name="indexed" id="all"  /> <br><input type="checkbox" name="indexed" id="all1"  /> <br><input type="checkbox" name="indexed" id="all2" /> <br><input type="checkbox" name="indexed" id="all3"  /> <br><input type="checkbox" id="checkAll"><label for="checkAll">全选</label>$(document).ready( function() {$("#checkAll").bind("change",function(){var checked=$(this).attr("checked");$(":checkbox[name='indexed']").attr("checked",checked);});});

?

热点排行