title: Random number in JavaScript per day once
body: <p>I'm in the process of coding an application that does the following: </p>
  
  <ol>
  <li>Generates a random number with 4 digits.</li>
  <li>Changes it once per calendar day.</li>
  <li>Won't change that full day. Only once in a day.</li>
  </ol>
  
  <p>I tried:</p>
  
  <pre><code>function my_doubt()
   {
     var place = document.getElementById("my_div")
     place.innerHTML=Math.floor((Math.random()*100)+1);
   }
  </code></pre>
  
  <p>I'm getting a random number with <code>Math.random()</code>. However, I'm rather clueless about how to generate a different number for each day. What are some common approaches for tackling this problem?</p>
  
  <p>Note: It doesn't have to be <em>really</em> random. A pseudo - random number is also OK.</p>