title: How to specify range on math.random?
body: <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;input type="Textbox" id="pwbx" /&gt;
  
  &lt;button OnClick="GetRandom()" type="button"&gt;generate&lt;/button&gt;
  &lt;script&gt;
  function getCharacter() {
  return Math.floor(Math.random() * 18).toString(18);
  }
  for( var str="", i=0, l=14+Math.floor(Math.random()*3); i&lt;l; i++) {
  str += getCharacter();
  }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This gives me a random number under 1, like 0.4567432112 etc.</p>
  
  <p>How would I alter this to give me a string of between 14 and 16 characters, random alphanumerical? So a string of either 14, 15 or 16 characters made up of abcdefgh0123456789?</p>
  
  <p>Thanks</p>