get form input values jquery code example
Example 1: javascript jquery get form field value
$(document).ready(function(){
$("#buttonSet").click(function () {
$("#txtBox").val("Amit");
$("input:radio").val(["male"]);
$("#buttonGet").removeAttr('disabled');
});
$("#buttonGet").click(function () {
$("#result").html(
$("#txtBox").val() + "<br/>" +
$("input:radio[name=rd]:checked").val()
);
});
});
Example 2: get input value jquery
//Get
var bla = $('#txt_name').val();
//Set
$('#txt_name').val(bla);