标签:ret span str func 扩展 turn this nbsp prototype
1.去除字符串前置后置空格:
String.prototype.trimStr = function () { return this.replace(/^\s+|\s+$/g,‘‘); }
js扩展
原文地址:https://www.cnblogs.com/glory0727/p/8973330.html