ie9以前版本,不支持string.trim()方法
所以需要自己实现。
<script type="text/javascript"> String.prototype.trim = function () { return this.replace(/(^\s*)|(\s*$)/g, "");}</script>
js的trim方法
原文:http://www.cnblogs.com/Tpf386/p/6970696.html