在javascript中,如果删除二维数组中重复的元素 时间:2020-05-12 人气:0 了很久,始终没想出解决方案,大伙给点思路吧. <script language="javascript"> var fruit = new Array(3); fruit[0] = new Array("苹果", "a"); fruit[1] = new Array("苹果", "a"); fruit[2] = new Array("橘子", "2"); for (i=0; i < fruit.length; i++) { for (j=0; j < fruit[0].length; j++) { document.write("fruit [", i, "][", j, "] = ", fruit[i][j]," "); } document.write(" "); } </script> [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] 加载全部内容