title: validate value while typing in the texbox using javascript
body: <p>I am trying a task in which there is a input field for loan amount which should range between 5k to 10k.
  its should while typing in the textbox itself.
  (i.e) if i enter starting 2 or 3 or 4 as number it should show the alert box.
  i have coded to display the alterbox but its show after moving to another textbox.
  could anyone find what wrong i have done.?</p>
  
  <pre><code>&lt;input type="text"  id="loan_amt" name="loanamt"  onkeyup="calemi();" onblur="rangeforloanamt(this);"/&gt;
  
  function rangeforloanamt(givenval) //Customer loan form : loan amount minimum and maximum value validation
      {
          if(!(givenval.value &gt;= 50000 &amp;&amp; givenval.value &lt;= 100000))
              {
                  alert("enter loan amount between 50000 and 100000");  
                  return false;
              }
      }
  </code></pre>
  
  <p>here is my code.. and thanks in advance</p>