摘要: js 取掉空格自定义函数 1 //取掉左右空格: 2 3 function trim(str){ 4 5 return str.replace(/(^\s*)|(\s*$)/g, ""); 6 7 } 8 9 //取掉左边空格:10 11 function ltrim(str){... 阅读全文
posted @ 2015-08-11 15:35 土豆哥 阅读(262) 评论(0) 推荐(0)