Using a var in an input tag

Using a var in an input tag

How would I use a var in an input tag as in:

  1. <input id="zoom" name="zoom" type="range" value="myVarHere" min="0" max="25"/>

Thank you.

Edit:
This seems to work:

  1.             <div id="divzoom" data-role="fieldcontain" >
                 <input id="zoom" name="zoom" type="range" min="0" max="25"/>        
                    <script>
                        $("#zoom").attr("value", zoomlevel);
                    </script>
                </div>