javascript - TypeError: depId.remove is not a function 求解决 谢谢 --?
本文介绍了javascript - TypeError: depId.remove is not a function 求解决 谢谢 --?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
// 打印结果
console.log(depId);
["25", "12", "1", "18", "13"]
console.log(typeof(depId));
object
// 我的代码
var thisID=$(this).parent().attr("id");
depId.remove(depId.indexOf(thisID));
// 错误提示
TypeError: depId.remove is not a function
depId.remove ...;
jq 已经引入了啊 另外好像我其他地方也有用到是没问题的 火狐浏览器都是
GET jquery-1.8.3.min.js
200 OK
91.4 KB
127.0.0.1:80
为什么有的地方好用啊
解决方案
js 数组哪来的remove
方法?用splice
这篇关于javascript - TypeError: depId.remove is not a function 求解决 谢谢 --?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文