随笔分类 -  js

摘要:1、npm install mobile-select -D 2、import MobileSelect from 'mobile-select' <a class="search-item"> <span id="city-tr">{{ cityTxt }}</span> <i class="do 阅读全文
posted @ 2019-04-24 12:02 霜~ 阅读(1970) 评论(0) 推荐(0)
摘要:const arr1 = []; 1、Object.prototype.toString.call(arr)// [object Array] 返回数据属于的数据类型。通过原型的方式,更有效检测不同类型; 2、arr1.constructor //返回arr1继承的构造函数 3、arr1 insta 阅读全文
posted @ 2019-04-18 14:08 霜~ 阅读(1395) 评论(0) 推荐(0)
摘要:1、getComputedStyle(ele,null).fontSize //ele所需获取样式的元素节点 第二个参数填null就好。后面属性是你需要的样式属性。ie不支持。 2、ie:oBox.currentStyle.fontSize //ie内使用currentStyle 3、兼容: fun 阅读全文
posted @ 2018-09-12 14:41 霜~ 阅读(389) 评论(0) 推荐(0)
摘要://html <div class="to-top" data-id="#index"></div> //使用 返回顶部 $(".to-top").unbind("click").click(function(){ var ele=$(this); reachToPoint(ele); }); fu 阅读全文
posted @ 2018-03-09 09:18 霜~ 阅读(222) 评论(0) 推荐(0)