value of input jquery code example
Example 1: how to get a value using jquery
<input type="text" id="myid" class="myclass" >
$("#myid").val();
$(".myclass").val();
Example 2: jquery value of input
$("#textInput").val()
Example 3: get value of input jqueyr
var str = $("#myInput"). val();
Example 4: jquery set input value
$("button").click(function(){
$("input:text").val("Glenn Quagmire");
})
Example 5: jquery set textbox value
$.get('compz.php?prodid=' + x + '&qbuys=' + y, function(data) {
$('#subtotal').val(data);
});
Example 6: get input value jquery
var bla = $('#txt_name').val();
$('#txt_name').val(bla);