Here I made a text input which displays 1000 devided by the vlaue of text range:
<input type="range" name="rangeInput" min="50" max="200" onchange="updateTextInput(this.value);"><br>
<input type="text" id="fps" placeholder="fps" ><br>
<script>
function updateTextInput(val) {document.getElementById('fps').value=1000/val;}
</script>
The number results appear way beyond the decimal point. How can I limit the number of characters (for example 4 digits: 12.34) that appears on text input? maxlength
doesn't seem to work here.