Blank out a form with jQuery

$(':input','#myform')
 
.not(':button, :submit, :reset, :hidden')
 
.val('')
 
.removeAttr('checked')
 
.removeAttr('selected');
Published Monday, November 22, 2010 6:23 PM by Haitham Khedre
Filed under:

Comments

# re: Blank out a form with jQuery

Saturday, March 12, 2011 12:36 PM by SGWellens

If you use the jQuery Forms plugin, these functions are provided:

-resetForm

-clearForm

-clearFields

http://jquery.malsup.com/form/

# re: Blank out a form with jQuery

Saturday, March 12, 2011 4:12 PM by Haitham Khedre

Thanks

Leave a Comment

(required) 
(required) 
(optional)
(required)