兼容所有浏览器的清除前后空格的方法
if(!String.prototype.trim){
String.prototype.trim = function(){
return this.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '');
}
}
mannuan
Rome was not built in a day.
if(!String.prototype.trim){
String.prototype.trim = function(){
return this.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '');
}
}