title: How to get the 'age' from input type 'date' using html & js?
body: <p>My question is how to get the age from the date input type using Javascript, and show it in Html.</p>
  
  <p>I want the user to be able to select his <strong>Date of Birth</strong> from the <strong>Date</strong> input type, which should then be put into the 'bday' ID that I can then use to calculate the age from and fill it in the 'resultBday' element ID.</p>
  
  <p>For example:<br>
  When the user selects 'January 15th, 1990' I want it to show "24 years old" in the innerHtml.  </p>
  
  <p>This is what I currently have:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;p id="resultBday"&gt;&lt;/p&gt;
  &lt;input type="date" name="bday" id="bday" onchange="submitBday()"&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function submitBday () {
      var Q4A = "Your birthday is: "
      var Bday = document.getElementById('bday').value;
      Q4A += Bday;
  
      var theBday = document.getElementById('resultBday');
      theBday.innerHTML = Q4A;
  }
  </code></pre>