title: how to limit the textbox input to numeric 0-10 in html
body: <p>hi i have a textbox in html and i want a user to enter the numeric values only which  will be for eg. 0,1,2,3,4,5,6,7,8,9,10 and if a user enters 11 it should show an alert box showing "only 0-10 is allowed" since i am a newbie
  so far i have this script</p>
  
  <pre><code>SCRIPT language=Javascript&gt;
  
           function validateForm()
           {
               var x=document.form["tst"]["num"].value;
               var y = parseInt( x  ,  10  )
               var i=15;
               if (y&gt;i)
               {
                   alert("Range is Between 0-10");
                   return false;
               }
           }
  &lt;/script&gt;
  </code></pre>
  
  <p>here is my textbox code,</p>
  
  <pre><code>  &lt;INPUT  id="num" name="num" onkeypress="return validateForm()" size="2" maxlength="2" type="text" &gt;
  </code></pre>