function regText(text){
	var reg = /^[\s\u4e00-\u9fa5a-z0-9_-]{0,}$/;
	if(!reg.exec(text)){
		console.log("非法字符")
		
	}else{
		console.log("有效字符")
	}	
}
regText("abc+")


验证 :汉字、英文、数字、下划线、中划线、空格

相关文章:

  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2021-11-26
  • 2021-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
  • 2021-10-14
相关资源
相似解决方案