jquery 可见元素 $("input[name=check_all]").click(function () { $(":checkbox[name=download_filename]:visible").attr("checked", $(this).attr("checked")) })