Quantcast
Viewing latest article 2
Browse Latest Browse All 3

Answer by MarsOne for Value of HTML input range, getattribute vs value

There is very little documentation on Input Type=RANGE on the internet...

It is not supported in ie9 and older browsers since it is a newer HTML5 element.

Here is a Demo on how it works

Here is the code I used.

HTML

<p>Minimum =0, Maximum = 100, Step = 5</p><input id="slider" type="range" min="0" max="100" step="5" onchange="printValue('slider','rangeValue')"><input id="rangeValue" type="text" size="5" />

JS

function printValue(sliderID,TextBoxID){    document.getElementById(TextBoxID).value=document.getElementById(sliderID).value;}

Viewing latest article 2
Browse Latest Browse All 3

Trending Articles