Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

not allow decimal in input type number

<form action="#" method="post">
  Numbers: <input name="num" 
                  type="number"
                  min="1"
                  step="1"
                  onkeypress="return event.charCode >= 48 && event.charCode <= 57"
                  title="Numbers only">
  <input type="submit">
</form>
 
PREVIOUS NEXT
Tagged: #decimal #input #type #number
ADD COMMENT
Topic
Name
1+4 =