Dear Googler,
Sometimes we need the user to enter only numbers in a text filed, so I have some up with a small piece of JavaScript to do exactly that. It works for both IE and Firefox.
Code: JavaScript
function onlyNumbers (evt)
{
var e = event || evt ; // for trans-browser compatibility
Sometimes we need the user to enter only numbers in a text filed, so I have some up with a small piece of JavaScript to do exactly that. It works for both IE and Firefox.
Code: JavaScript
function onlyNumbers (evt)
{
var e = event || evt ; // for trans-browser compatibility