ie8 $("input[name=items]").attr("checked",null);不能实现反选? 这个能实现全选啊。求解释。$("input[name=items]").attr("checked","checked");百度知道有点删问题。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $("input[name=items]").attr("checked",false);看看 我测试了下,ie8下$("input[name=items]").attr("checked",null);也是可以的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><script src="jquery-1.7.1.min.js"></script><head><body> <input name=items type=checkbox> <input name=items type=checkbox> <input name=items type=checkbox> <input name=items type=checkbox><input type="button" value="selectAll" onclick='$("input[name=items]").attr("checked","checked");'><input type="button" value="UnSelectAll" onclick='$("input[name=items]").attr("checked",null);'><input type="button" value="UnSelectAll" onclick='$("input[name=items]").attr("checked",false);'></body></html> $("input[name=items]").removeAttr("checked"); 我把jquery库换成了1.7就行了 如何部分删除div下a 求帮忙!!! 麻烦各位帮我看下这个js,详细帮我解释下,可以吗?谢谢 请问怎么用js来追加值到表单中? 图片旋转效果 加入html编辑器后,无法判断有无文本??? 急急~~ 求高手编写一JS代码,执行网页编码转换 共赏: Very Good 的TabStrip、Menu、TreeView ! 帮忙写个正则表达式吧?? 打开链接的两个方法哪个好? js重定向 jq数组输出的问题...
看看
$("input[name=items]").attr("checked",null);
也是可以的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="jquery-1.7.1.min.js"></script><head>
<body>
<input name=items type=checkbox>
<input name=items type=checkbox>
<input name=items type=checkbox>
<input name=items type=checkbox>
<input type="button" value="selectAll" onclick='$("input[name=items]").attr("checked","checked");'>
<input type="button" value="UnSelectAll" onclick='$("input[name=items]").attr("checked",null);'>
<input type="button" value="UnSelectAll" onclick='$("input[name=items]").attr("checked",false);'>
</body>
</html>
7就行了