Hi! I'm not completely fluent in HTML, JS and CSS but I know bits and bobs. This and a couple of JS files will create a working slider as shown below. It's default number is "50" as shown in the value, I was wondering if I could use the slider as a variable. So the user slides it and chooses a number which is set into a variable. Then the variable I could use in HTML. <form> <label for="slider-1">Slider:</label> <input type="range" name="slider-1" id="slider-1" min="0" max="100" value="50"> </form>
Look up the specs for the 'input' HTML form tag. There you will find that you can set the value as you please.
I am not sure I fully understand the question, but maybe this will help: http://jsfiddle.net/7gpdX/16/
<form> <label for="slider-1">Slider:</label> <input type="range" name="slider-1" id="slider-1" min="0" max="100" value="50" onchange="updateVariable(this);"> </form> <script type="text/javascript"> var value = 0; function updateVariable(sender) { value = sender.value; console.log(value); } </script> Code (markup):