Answers for "input type number only"

1

html input box integer only

<input type="number" name="someid" />
Posted by: Guest on March-10-2020
0

input text tag only input integer number

<input type="text" class="number" />

<script>
function degitOnly(e){
    var unicode = e.charCode ? e.charCode : e.keyCode;
      if (unicode!=8 && unicode!=9)
     {
     	 if (unicode<46||unicode>57||unicode==47)
     		 return false
    }
}

$(".number").inputFilter(function(value) {
    return /^-?\d*$/.test(value);
});
</script>
Posted by: Guest on April-30-2021
-1

number input html

<input id="number" type="number" value="42">
Posted by: Guest on November-13-2020

Code answers related to "input type number only"

Browse Popular Code Answers by Language