var reg = /^[a-zA-Z\u4e00-\u9fa5]{0,10}$/;var input = "asdfaasda中";if(!reg.test(input)){alert("wrong");}