title: JavaScript variable to slider max attribute
body: <p>Is there a way to put a JavaScript variable into slider's <strong>"max"</strong> attribute value?
  For example,</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  myVar="20";
  &lt;/script&gt;
  
  
  &lt;input id="slider1" name="sliderr" type="range" max="myVar"&gt;&lt;/input&gt;
  </code></pre>