title: Age Calculator in Javascript
body: <p>I have this codes, this code must be able to compute the age of the user and It must be displayed on the text box provided and the age must change if the user changed his birth-date.
  but this code does not work, it doesn't display the computed age in the textbox.</p>
  
  <pre><code>&lt;input name= "date" type="text" readonly="readonly"  /&gt;
  
  &lt;select id="Ultra" onchange="run()"&gt;  
   &lt;option value="11/15/991"&gt;1991-11-15&lt;/option&gt;
   &lt;option value="10/23/1992"&gt;1992-10-23&lt;/option&gt;
  &lt;/select&gt;&lt;br&gt;&lt;br&gt;
  TextBox1&lt;br&gt;
   &lt;input type="text" id="srt" placeholder="get value on option select"   readonly="readonly"&gt;&lt;br&gt;
  &lt;script type="text/javascript"&gt;
  function run() {
    var birth = document.getElementById("Ultra").value;
    var check = new Date();
    var milliDay = 1000 * 60 * 60 * 24;
  
    var AgeinDay = (check - birth) / milliday;
    var ComputAge = Math.floor(AgeinDay / 365 );
    var age = ComputAge / 365;
    document.getElementById("srt").value = age;
  }
   &lt;/script&gt;
  </code></pre>