There are two ways that I hope will work.
If you want to enter percentages in the input and want to convert them to decimal numbers in js, then:
<input type="number" min="1" max="100" id="myPercent"/>
in js:
document.getElementById('myForm').onsubmit = function() { var valInDecimals = document.getElementById('myPercent').value / 100; }
If the scenario is reverse, then:
<input type="number" min="0" max="1" step="0.01" id="myPercent"/>
in js:
document.getElementById('myForm').onsubmit = function() { var valInDecimals = document.getElementById('myPercent').value * 100; }
Bunny buns
source share