判断checkbox是否被选中
代码如下:
选中复选框为true,没选中为false。
$("input[type='checkbox']").prop("checked");
另一种写法:
checkbox状态是checked时候为true,否则为false
$("#id").is(':checked');
网站:http://shibowl.top
github:https://github.com/hanbinjxnc
博客园:https://www.cnblogs.com/hool
博客:https://blog.shibowl.top
淘宝店:https://boxunwl.taobao.com/
作者:世博 2019年4月28日----
github:https://github.com/hanbinjxnc
博客园:https://www.cnblogs.com/hool
博客:https://blog.shibowl.top
淘宝店:https://boxunwl.taobao.com/
作者:世博 2019年4月28日----