摘要:
js删除数组中的指定元素的方法为: Array.prototype.remove = function(val) { var index = this.indexOf(val); if (index > -1) { this.splice(index, 1); } } 调用方式为 var eleme 阅读全文
posted @ 2020-09-08 11:11
罗毅豪
阅读(2585)
评论(0)
推荐(0)
摘要:
在前端开发过程中,我们可以优化一些代码的书写。 1.用箭头函数进行简化。如将 $(".selectAll").click(function(){ $(".tickImg").attr("src","images/tickFilled.png") }) 优化为 $(".selectAll").clic 阅读全文
posted @ 2020-09-08 10:56
罗毅豪
阅读(395)
评论(0)
推荐(0)

浙公网安备 33010602011771号