Solution:
$('input[type="checkbox "]').bind('click',function() {
$(this).prop('checked').checkboxradio("refresh"); // The binding event updates the checked value of the checkbox in time
});
If you want to use js to change the value of the checkbox, you must refresh it in time.
$('input [type="checkbox"]' ).attr('checked',false).checkboxradio("refresh");
$('input [type="checkbox"]').attr('checked',false).checkboxradio("refresh") ;
Cause: jquerymobile cannot re-render after manually changing its value. In this way, the value displayed on the page is different from the actual value. (jquerymobile hides all form elements, and then uses js to add some elements to beautify the effects of input, select, textarea and other elements)
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