Reset values from jQuery Mobile
问题 I need to reset all the values of field elements of my page. The elements are: inputs, selects (combobox), checkbox and radio group. Searching found the following code: $("*").attr('value', ''); $("input[type='checkbox']").attr("checked",false); $('select').each(function() { if($(this).children().length > 0) { $($(this).children()[0]).attr('selected', 'selected'); $(this).change(); } }); Inputs and checkbox are ok with this code, but the other components present problems with the codes