如何为InternetExplorer浏览器修复JavaScript中的Array 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;}
if (!Array.prototype.indexOf) { // Implement function here}
//Pseudo-codeif (browser == IE Style Browser) { // Implement function here}
largeQ
梦里花落0921
繁星淼淼
相关分类