title: How to restrict user to type 10 digit numbers in input element?
body: <p>I want to create a input field for phone number.  I am creating input field using JavaScript dynamically.</p>
  
  <pre><code>&lt;input type="text" id="phone" name="phone"&gt;
  </code></pre>
  
  <p>How to restrict users to type only 10 digit numbers in order to get a phone number.</p>