Answers for "input type text with number only"

0

type numeric value only in textbox javascript

function isNumber(evt) {
    evt = (evt) ? evt : window.event;
    var charCode = (evt.which) ? evt.which : evt.keyCode;
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        return false;
    }
    return true;
}
Posted by: Guest on January-22-2021
0

type numeric value only in textbox javascript

<input type="text" class="textfield" value="" id="extra7" name="extra7" onkeypress="return isNumber(event)" />
Posted by: Guest on January-22-2021
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

Code answers related to "input type text with number only"

Browse Popular Code Answers by Language