//替换特殊字符 $(this).val($(this).val().replace(/[~'!<>@#$%^&*()-+_=:]/g, "")); 转载于:https://www.cnblogs.com/2260827114com/p/5121129.html