In HTML, if a checkbox is checked, the corresponding tag is checked="checked" . But if you use jquery alert($("#id").attr("checked")), you will be prompted that it is "true" instead of "checked", so judge if("checked"==$("#id" ).attr("checked")) is wrong and should be written as above: if(true == $("#id").attr("checked"))
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn