Answers for "input only numbers javascript"

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
1

html input box integer only

<input type="number" name="someid" />
Posted by: Guest on March-10-2020
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

Browse Popular Code Answers by Language