去除空格 function trim(str) { // 去除头和尾 return str.replace(/^[" "||" "]*/,"").replace(/[" "|" "]*$/,""); /……

阅读全文