how to get and set value from and to from input text using jQuery when we have multiple input textbox in html

how to get and set value from and to from input text using jQuery when we have multiple input textbox in html

 $('#example tfoot input[type="text"]').last().val($(this).val())
# HTML
<input type="text" name="quantity" value="1" class="input-text ">
<input type="text" name="quality" value="2" class="input-text ">

#jquery
$('[name]').first().val() // 1
$('[name]').last().val() // 2


Leave a Reply