Sunday 15 August 2010

html5 - How to reset the slider value based on checkbox using JavaScript? -



html5 - How to reset the slider value based on checkbox using JavaScript? -

i have range slier & trying reset it's value default if checkbox clicked. can tell how this?

this tried:

html:

<input type="range" id="myrange" max="10000" min="60"> <input type="checkbox" id="lala" onclick="myfunction()"> checkme

javascript:

function myfunction() { document.getelementbyid('myrange').value=60; }

fiddle

you seek phone call undefined function, i´ve edited fiddle http://jsfiddle.net/3kqyaaup/2/ (move js <head>) , works.

<script> function myfunction() { document.getelementbyid('myrange').value=60; } </script> <input type="range" id="myrange" max="10000" min="60"> <input type="checkbox" id="lala" onclick="myfunction()"> checkme

javascript html5 checkbox rangeslider

No comments:

Post a Comment