- 博客(1)
- 收藏
- 关注
原创 JavaScript prototype 属性
在js中,prototype属性可以为对象添加属性和方法。 1):为对象添加方法 --查询数组是否存在某元素: Array.prototype.isExist= function(value){ for(var i=0;i<this.length;i++){ if(this[i] == value){ return true;
2017-03-24 13:37:22
126
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅