1
have this script:
$(".btn_contact").click(function () {
$.ajax({
type: "POST",
url: "./Inserir16",
data: $("#feedback_form16").serialize(), // serializes the form's elements.
dataType: "json",
success: function (data)
{
$(".success_messages").removeClass('hide'); // success message
},
error: function(data){
$(".error_message").removeClass('hide'); // error message
},
complete: function()
{
$("#feedback_form16").find('input').val(''); //clear text
}
});
});
This way eliminates all input fields, but I just want to delete a specific field of the form, which has the name and id of Qtd. Anyone can help?
Have you tried
$("#Qtd").val('')
?– Sam
@dvd, I tried but it didn’t work
– Bruno
Okay! But you put in which function?
– Sam
In the complete function
– Bruno