title: Using javascript in html to generate random numbers
body: <p>So I'm trying to create a random number generator in html using javascript to randomise and alert the user of the number generated. However I always get an error when getting my number which I don't experience when using codecademy. The code is:</p>
  
  <pre><code>&lt;input type="button" value="Enter" id="enter"
  onClick="alert(getRandomInt(document.getElementById('min').value,
  document.getElementById('max').value));"&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
  function getRandomInt(min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min;
  }
  </code></pre>
  
  <p>When 5 and 10 are input as min and max numbers respectively,for example,the resulting numbers are 15,25,05,35 etc. The first digits apparently is found using the function</p>
  
  <pre><code>Math.floor(Math.random() * (max - min + 1))
  </code></pre>
  
  <p>and the last digit would be the number 5 which is the minimum. So I was wondering if anyone could teach me how to put the + min into the entire operation so I can get a number within the range of 5-10? Thanks in advance</p>