方法一
String.prototype.trim = function () {
return this .replace(/^\s\s*/, '' ).replace(/\s\s*$/, '' );
}
方法二
$.trim(parameter);
解决ie8下的不支持trim
最新推荐文章于 2022-06-24 15:33:22 发布
方法一
String.prototype.trim = function () {
return this .replace(/^\s\s*/, '' ).replace(/\s\s*$/, '' );
}
方法二
$.trim(parameter);