为javascript中的string对象添加去除左右空格的方法(示例代码)