For those who are still looking for a solution without separate javascript code. There is little simple solution without writing a javascript or jquery function:
<form name="registrationForm"> <input type="range" name="ageInputName" id="ageInputId" value="24" min="1" max="100" oninput="ageOutputId.value = ageInputId.value"> <output name="ageOutputName" id="ageOutputId">24</output> </form>
JsFiddle Demo
If you want to show the value in the text box, just change the output to input.
Update:
This is still Javascript written in your html, you can replace the bindings with the code below JS:
document.registrationForm.ageInputId.oninput = function(){ document.registrationForm.ageOutputId.value = document.registrationForm.ageInputId.value; }
Use identifier or element name, both are supported in morden browsers.
Rahul R. Sep 21 '13 at 18:52 2013-09-21 18:52
source share