Answers for "jquery get value of clicked button in form submit"

0

how to get value of button that click on it jquery

$("button").click(function() {
    var button = $(this).val();
    alert(button);
});
Posted by: Guest on December-29-2020
0

jquery get value of input submit

$("#submit_button").click(function() {
    var data = $("#my_form").serialize();
    data += data.length ? "&" : ""; // check if empty
    data += escape($(this).attr("name"))+"="+escape($(this).val());
    // ...
    return false;
});
Posted by: Guest on January-04-2021

Code answers related to "jquery get value of clicked button in form submit"

Code answers related to "Javascript"

Browse Popular Code Answers by Language