function(value){
if(value){
var reg=new RegExp("^[a-zA-Z0-9_-]+$");
return reg.test(value)
}
return true;
}
/**
* @description 得到字符串长度(中文算两个长度,数字字母算一个)
* @return {number} sum 字符串长度
*/
String.prototype.getLength = function() {
var i, sum;
sum = 0;
for (i = 0; i < this.length; i++) {
if ((this.charCodeAt(i) >= 0) && (this.charCodeAt(i) <= 255))
sum = sum + 1;
else
sum = sum + 3;
}
return sum;
}