jquery reset form
$('.login-form').trigger("reset");
jquery clear form values
$(".reset").click(function() {
$(this).closest('form').find("input[type=text], textarea").val("");
});
set form empty jquery
$('#formId')[0].reset();
OR
// For jQuery 1.6+:
$(':input','#formId')
.not(':button, :submit, :reset, :hidden')
.val('')
.prop('checked', false)
.prop('selected', false);
// For jQuery < 1.6:
$(':input','#formId')
.not(':button, :submit, :reset, :hidden')
.val('')
.removeAttr('checked')
.removeAttr('selected');
empty form elements except jquery
// Bind an event handler to the "click" JavaScript event
$('#clear').click(function(){
// Selects all elements of type text and clear all
$('#parent > input:text:not(".ignore")').val('');
// For excluding Multiple inputs
$("input:text:not('#objective_time_period, #subjective_time_period')").val('');
});
Example : http://jsfiddle.net/3zVyv/1/
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us