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, "");
}
详细解决方案
js正则往空格,全空格,左右空格
热度:527 发布时间:2012-11-23 22:54:33.0
相关解决方案