jQuery API 返回首页目录 | jQuery API 中英文对照版
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();
相关链接
asp之家 | jQuery官方网站 | jQuery中文网 | 电子书作者网站 | 电子书作者blog