随笔分类 -  js

消息委托
摘要: 阅读全文

posted @ 2022-11-12 21:11 yemiaomiao 阅读(9) 评论(0) 推荐(0) 编辑

js中+的使用
摘要:1. +someTypeId, 把string的id转换为number类型 2. 3.+startTime(startTime为Thu Mar 05 2020 08:00:00 GMT+0800 (中国标准时间)这样的形式)得到的也是毫秒 阅读全文

posted @ 2022-11-12 20:49 yemiaomiao 阅读(19) 评论(0) 推荐(0) 编辑

lodash常用方法
摘要:有关Array的方法: 1._.chunk(array, [size=1]),返回size长度数组组成的新数组 _.chunk(['a', 'b', 'c', 'd'], 2); // => [['a', 'b'], ['c', 'd']] _.chunk(['a', 'b', 'c', 'd'], 阅读全文

posted @ 2021-06-10 00:29 yemiaomiao 阅读(433) 评论(0) 推荐(0) 编辑

对于某些元素执行click()不生效,采用模拟鼠标click事件
摘要:/**模拟click事件*/ function simulate_click(elem) { if (document.createEvent) { var e = document.createEvent("MouseEvents"); e.initMouseEvent("click", true 阅读全文

posted @ 2019-03-08 19:14 yemiaomiao 阅读(281) 评论(0) 推荐(0) 编辑

自动生成轮播图小圆点
摘要: 阅读全文

posted @ 2018-08-20 00:29 yemiaomiao 阅读(253) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示