/ Published in: jQuery
Removes anything that isn't a digit from input on complete.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$("#PHONE1, #PHONE2, #FAX, #CELL").each(function() { $(this).mask("(999)999-9999", { completed : function () { $(this).val($(this).val().replace(/\D/g, "")).unmask(); } }); });