var toTrim = function(str) {
return str
.replace(
/(^(\s|\r\n| |<br\/?>|<BR\/?>)*)|((\s| |<br\/?>|<BR\/?>)*$)/g,
' ');
} // 去掉字符串首尾的空格与换行
var toTrim = function(str) {
return str
.replace(
/(^(\s|\r\n| |<br\/?>|<BR\/?>)*)|((\s| |<br\/?>|<BR\/?>)*$)/g,
' ');
} // 去掉字符串首尾的空格与换行