摘要: 1.防抖 什么是防抖:多次触发事件后,事件处理函数只执行一次,并且是在触发操作结束时执行 原理:将若干个函数调用合成为一次,并在给定时间过去之后仅被调用一次 代码实现: ① 创建滚动条 <p>请试着滚动 DIV 中的文本:</p> <div style="width:200px;height:100 阅读全文
posted @ 2019-01-09 13:27 回忆成风 阅读(231) 评论(0) 推荐(0) 编辑
摘要: var getId=(function(){ var i=0; return function(){ return i++ } })() console.log(getId); console.log(getId); 阅读全文
posted @ 2019-01-08 16:39 回忆成风 阅读(290) 评论(0) 推荐(0) 编辑
摘要: process.nextTick(); 阅读全文
posted @ 2018-09-21 10:06 回忆成风 阅读(57) 评论(0) 推荐(0) 编辑
摘要: //引入模块 const async = require('async'); //接口 1. function create(req,res){ async.waterfall([ //执行的方法 function (callback){ // 内容 事物处理 //返回结果 if (err) { r 阅读全文
posted @ 2018-09-19 09:18 回忆成风 阅读(102) 评论(0) 推荐(0) 编辑
摘要: //放置项目标题 <style> .banner{ padding-left:50px; margin-top:50px; color:#002E70; foot-family:微雅软黑; foot-size:15px; foot-weight:600; position:relative; //相 阅读全文
posted @ 2018-09-14 17:33 回忆成风 阅读(147) 评论(10) 推荐(0) 编辑
摘要: 使用process.cwd()方法即可。 阅读全文
posted @ 2018-09-10 10:17 回忆成风 阅读(242) 评论(1) 推荐(0) 编辑