IE6 Array IndexOf undefind 的问题

        if (!Array.prototype.indexOf) {
            Array.prototype.indexOf = function(obj, start) {
                 for (var i = (start || 0), j = this.length; i < j; i++) {
                     if (this[i] === obj) { return i; }
                 }
                 return -1;
            }
        }

http://stackoverflow.com/questions/1744310/how-to-fix-array-indexof-in-javascript-for-ie-browsers

posted @ 2013-12-12 10:01  yumuxu  阅读(155)  评论(0编辑  收藏  举报