不知道爲什麼,我得到這個錯誤:錯誤:對象不支持屬性或方法 '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 –