/ Published in: JavaScript
Use with onkeyup="numbersOnly(this)"
Expand |
Embed | Plain Text
function numbersOnly(el) { el.value = el.value.replace(/[^0-9]/g, ""); }
You need to login to post a comment.
tylerhall on 07/24/06
form regex textmate numbers validation only
3 people have marked this snippet as a favorite
Use with onkeyup="numbersOnly(this)"
function numbersOnly(el) { el.value = el.value.replace(/[^0-9]/g, ""); }
You need to login to post a comment.