1.javaScript的trim();函数在ie中的不支持,重写trim()方法;

//跨浏览器的trim脚本
String.prototype.trim = function(){
return this.replace(/(^\[*)|(\]*$)/g,"");
}

 

相关文章: