I tried to use jquery syntax to get number value from input field, but it does not work, the console did not show input value. Below is my code:
$(document).ready(function() {
var num = $("#a").val();
console.log(num);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input id="a" type="number">
<input id="a" type="number" value="123">