title: Maximum and minimum values in a textbox
body: <p>I have a textbox. Is there a way where the highest value the user can enter is 100 and the lowest is 0?</p>
  
  <p>So if the user types in a number more than 100 then it will automatically change the value to 100 using a keyup() function and if user types in a number less than 0 it will display as 0?</p>
  
  <p>My textbox is below:</p>
  
  <pre><code>&lt;input type="text" name="textWeight" id="txtWeight" maxlength="5"/&gt;%&lt;/td&gt;
  </code></pre>
  
  <p>Can this be done using JavaScript?</p>