2020年1月17日
摘要: 谁来补充 阅读全文
posted @ 2020-01-17 16:02 猪mother 阅读(84) 评论(0) 推荐(0) 编辑
摘要: //监听页面的input的聚焦失焦事件,聚焦的时候页面滚动到页面中,失去焦点的时候页面归位 $('input').on('focus',function(){ this.scrollIntoView(); }) $("input").on("blur",function(){ window.scro 阅读全文
posted @ 2020-01-17 13:59 猪mother 阅读(298) 评论(0) 推荐(0) 编辑
摘要: <!-- (1)对于行内元素或具有inline-block属性的元素居中,比如span,img等可以使用text-align:center来实现 --> .box1{ width: 200px; border: 1px solid #000; text-align:center; } .son1{ 阅读全文
posted @ 2020-01-17 13:55 猪mother 阅读(217) 评论(0) 推荐(0) 编辑
摘要: let a=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]; var submin =[]; for (var i = 0, len = a.length; i < len; i += 10) { submin.push(a.slice 阅读全文
posted @ 2020-01-17 10:44 猪mother 阅读(1585) 评论(0) 推荐(0) 编辑
摘要: // 1.使用 slice 或 contcat 方法实现简单复制,简单值不一起改变,但是引用类型则原来对象和复制对象一起改变 var arr1 = [1, 2, 3, 4], arr2 = arr1.slice(0), arr3 = arr1.concat(); console.log(arr1, 阅读全文
posted @ 2020-01-17 10:19 猪mother 阅读(152) 评论(0) 推荐(0) 编辑