Search
 
SCRIPT & CODE EXAMPLE
 

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>
Comment

PREVIOUS NEXT
Code Example
Html :: html href to gmail 
Html :: phoneto html 
Html :: disable autocomplete on input 
Html :: html unicode info icon 
Html :: how to program a button to work in javascript 
Html :: bold text on HTML button 
Html :: how to create input box in html 
Html :: input textbox size 
Html :: html type file extension 
Html :: html phone number 
Html :: html color names 
Html :: font awesome tag 
Html :: require in html 
Html :: html delay 
Html :: how to get rid how white border on html page 
Html :: button email html 
Html :: Change color of calendar icon in HTML Date Input 
Html :: bootstrap 4 6 cdn 
Html :: css bootstrap refresh icon 
Html :: html svg favicon 
Html :: use v-model in custom component 
Html :: how change button color in html 
Html :: checkbox onchange vue 
Html :: bootstrap undismissable modal 
Html :: title attribute label tag html 
Html :: form hide in html 
Html :: vue transition v-if else 
Html :: how to make a draggable menu html/js jquery 
Html :: html tag for modal 
Html :: image html 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =