只能输入汉字数字和英文
$(".view-name").on("input propertychange",function(){
this.value = this.value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'');
});
只能输入数数字
this.value = this.value.replace(/[^\d]/g, '');