求多选框超过一定限制数就报错的js
var a=this.getValue();
var arr=a.split(",");
if(arr.length>5){
alert("不能超过5个")
this.setValue("")
}