摘要:JavaScript Trim Function
方法1:
	function trim(s){
	  return s.replace(/^\s*|\s*$/g,"")
	}
方法2:
	function myBestTrim(str) {
	  var start = -1,
	  end = str.length;
	  while (str.charCodeAt(--end) < 33);
	  while (str.charCodeAt(++start) < 33);
	  return str.slice(start, end + 1);
	}
Y2J's Life:http://kimenyeh.blogspot.tw/