Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

JS - Only numeric allowed and limit character on input

0 votes
added Jun 19, 2018 in Javascript by LC Marshal Captain (26,080 points)
edited Jul 13, 2018 by LC Marshal
<input id="contact" maxlength="12" name="phone-number" id="phone" value="<?php echo $myeq["userphone"]; ?>" class="valid-empty valid-phone" data-err-msg="Phone cannot be empty." data-invalid-msg="Invalid phone number, please use number only." onkeypress='return event.charCode >= 48 && event.charCode <= 57'>

Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.