such as the question, go to the code
<input type="text" name="address">
var pattern = new RegExp("[`~!@-sharp$^&*()=|{}":;",\\[\\].<>/?~@-sharp&*|{} ";:" ""]")
$("input").on("keyup",function () {
$(this).val($(this).val().replace(/\s+/g,""));
});
$("input[name="address"]").on("keyup",function (event) {
$(this).val($(this).val().replace(pattern,""));
});
used for the above code, you can"t input Chinese with Sogou Input in IE9/10/11