Edit This Code:
<!DOCTYPE html>
<html>
<body>

<input type="number" id="myNumber" value="2">

<p>Click the button to change the number of the number field.</p>

<button onclick="myFunction()">Try it</button>

<p><strong>Note:</strong> input elements with type="number" are not supported in IE 9 and earlier versions.</p>

<p id="demo"></p>

<script>
function myFunction() {
    document.getElementById("myNumber").value = "16";
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy