摘要: 1、首先查找出元素在数组中的位置即索引(数组中本来就有 indexOf() 方法,方便学习给出代码): Array.prototype.indexOf = function(val) { for (var i = 0; i < this.length; i++) { if (this[i] == v 阅读全文
posted @ 2022-10-30 09:48 奥兰王子 阅读(2541) 评论(0) 推荐(1) 编辑