Getting value of textbox using javascript/jquery
Javascript
and jquery are commonly used for client side scripting. Here we will see how we
can get value of textbox using javascript and jquery.
Html
<input type="number" id="txtAge" />
Using Javascript
<script type="text/javascript">
var age = document.getElementById("txtAge").value;
</script>
Jquery
<script type="text/javascript">
var
age = $("#txtAge").val();
</script>
Comments
Post a Comment