不知道为什么,我得到这个错误:错误:对象不支持属性或方法 'trimLeft'
Object doesn't support property or method 'trimLeft' when browse with IE
我的代码是:
var checkTrimLeadingWhiteSpace = function(str) {
if (str && ignoreLeadingWS) {
return str.trimLeft();
}
return str;
};
查看https://developer.mozilla.org/pl/docs/Web/JavaScript/Reference/Global_Objects/String/TrimLeft –