js使用replace去除不可见的字符、空格、回车等
String.prototype.Trim = function() {
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function() {
return this.replace(/(^\s*)/g, "");
}
String.prototype.RTrim = function() {
return this.replace(/(\s*$)/g, "");
}