Another jQuery script here.
When you add a numeric field in SharePoint, it is still possible to type in alphanumeric values. Only when you press the “ok” or “save” button, the value is checked.
You probably want to help the user to fill in those kinds of fields..
Well, here is a jQuery script to do just that, you can find many more online.
jQuery script
$(document).ready(function() { $(":input[title='Amount']").keydown(function (event) { if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105)) { } else if (event.keyCode != 8 && event.keyCode != 46 && event.keyCode != 37 && event.keyCode != 39) { event.preventDefault(); } }); });