Answers for "jquery don't empty specific form field after submit"

2

jquery clear form values

$(".reset").click(function() {
    $(this).closest('form').find("input[type=text], textarea").val("");
});
Posted by: Guest on April-03-2020
0

jquery don't empty specific form field after submit

// 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/
Posted by: Guest on November-13-2020
0

jquery don't empty specific form field after submit

form.find('textarea,input,select').not('input[name="INPUT_NAME_1"],input[name="INPUT_NAME_2"]').val('');
Posted by: Guest on January-19-2021

Code answers related to "jquery don't empty specific form field after submit"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language