// This code will bind a method to the paste operation, and in the method filters out the invalid chars. $('#yourelement').bind('paste', function() { var el = this; setTimeout(function() { el.value = el.value.replace(/\D/g, ''); }, 0); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)