<html>
<body>
Number:
<input type="number" id="myNumber" step="3">
<p>Click the button to display the value of the step attribute of the number field.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
let x = document.getElementById("myNumber").step;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>