<javascript>
String.prototype.trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g,"")
}
</javascript>
<javascript>
String.prototype.trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g,"")
}
</javascript>
转载于:https://www.cnblogs.com/ae6623/p/4416244.html