1$('#formId')[0].reset();
2OR
3// For jQuery 1.6+:
4$(':input','#formId')
5 .not(':button, :submit, :reset, :hidden')
6 .val('')
7 .prop('checked', false)
8 .prop('selected', false);
9
10// For jQuery < 1.6:
11$(':input','#formId')
12 .not(':button, :submit, :reset, :hidden')
13 .val('')
14 .removeAttr('checked')
15 .removeAttr('selected');
1// Bind an event handler to the "click" JavaScript event
2$('#clear').click(function(){
3 // Selects all elements of type text and clear all
4 $('#parent > input:text:not(".ignore")').val('');
5 // For excluding Multiple inputs
6 $("input:text:not('#objective_time_period, #subjective_time_period')").val('');
7});
8
9Example : http://jsfiddle.net/3zVyv/1/