JS
_no_idea
这个作者很懒,什么都没留下…
展开
-
js实现轮播(手动+自动)
js实现轮播(手动+自动) // html部分 <div id="banner"> <ul id="imagesL"> <li><a href="#"><img src="images/image01.JPG" alt=""></a></li> <li><a href="#"><img src="images/image02.JPG" alt="">原创 2021-04-19 14:51:12 · 227 阅读 · 0 评论 -
ES6简单map结构实现
ES6简单map结构实现 class myMap{ constructor(obj){ this.obj = {} this.length = 0 if(Array.isArray(obj)){ obj.every((item, index, arr) => { if(Array.isArray(item)){ this.obj[item[0]] = item[1]原创 2021-04-17 19:44:20 · 114 阅读 · 0 评论 -
ES6简单set结构实现
ES6简单set结构实现 class mySet{ constructor(obj){ this.obj = {} this.length = 0 if(Array.isArray(obj)){ for(let i = 0; i < obj.length; i++){ this.obj[this.length] = obj[i] this.length++ } }else if(typeof(obj) === String){ obj = obj原创 2021-04-17 19:38:44 · 102 阅读 · 0 评论