jQuery API | jQuery API 中英文对照版 - jQuery在线查询手册 |
clearForm() |
clearForm()Clears the form data. Takes the following actions on the form's input fields: - input text fields will have their 'value' property set to the empty string - select elements will have their 'selectedIndex' property set to -1 - checkbox and radio inputs will have their 'checked' property set to false - inputs of type submit, button, reset, and hidden will not be effected - button elements will not be effected 返回值jQuery 示例说明:Clears all forms on the page. jQuery 代码:$('form').clearForm(); |