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, "");
}

posted on 2016-03-08 15:59  来临  阅读(113)  评论(0)    收藏  举报