Some print.
Some print.
~SingleForum~无废话记录~ + ~19~记录点有用的好吗?少说废话少装b~

~SingleForum~无废话记录~ » js

jquery操作判断radio或checkbox

Started 2 years ago by admin. | Tags: . . .

不要尝试去做这样的判断:if($"#xxx".attr("checked")=="true")

因为这么做是错的,jQuery的API手册上写,attr(name)的返回值是object。

所以,应该是if($"#xxx".attr("checked")==true)

赋值的话$"#xxx".attr("checked",true);

RSS feed for this topic