最近在学习jquery 里面的DataTables.在里面碰到了checkbox 选中问题;特总结如下:
$(function()
{
$("#all").click(function()
{
$("input[name='sh']").attr("checked",this.checked);
});
});
不知道是什么原因,使用
$("input[name='sh']").attr("checked",$(this).attr("checked"));无效
最近在学习jquery 里面的DataTables.在里面碰到了checkbox 选中问题;特总结如下:
$(function()
{
$("#all").click(function()
{
$("input[name='sh']").attr("checked",this.checked);
});
});
不知道是什么原因,使用
$("input[name='sh']").attr("checked",$(this).attr("checked"));无效
打赏作者