javascript 下的trim函数 hecal · 2008-05-06 18:27 · Markdown function trim(str) { return str.replace(/^/s*(.*?)[/s/n]*$/g, '$1'); }