页面中添加代码

String.prototype.trim=function() {
    return this.replace(/(^\s*)|(\s*$)/g,'');
}

调用:title.trim()

 

相关文章: