日期:2014-05-16  浏览次数:20458 次

js trim()方法在IE下无法使用的问题

http://fhuan123.iteye.com/blog/1128854

?

转载

?

?

只要在使用trim()之前加上一句

String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");}

?

?OK!!!!