12 2019 档案

摘要:参考:https://www.cnblogs.com/wangzirui98/archive/2019/07/26/11249317.html 参考:https://www.mk2048.com/blog/blog.php?id=c1cakc0cbckj&title=%E5%B0%8F%E7%A8% 阅读全文
posted @ 2019-12-25 17:04 林中有风 阅读(2081) 评论(0) 推荐(0)
摘要:如果在webpack 安装 CleanWebpackPlugin最新版本报错 如果是报下面的错误的话 然后在控制台向上翻 会发现 TypeError: CleanWebpackPlugin is not a constructor 错误❌ 如图 解决办法 清理 /dist 文件夹 你可能已经注意到, 阅读全文
posted @ 2019-12-23 16:09 林中有风 阅读(1270) 评论(0) 推荐(0)
摘要:// 一般写法 function fn(event) { console.log(event) } div.onclick = function (event) { fn(event) } 简化后 function fn(event) { console.log(event) } div.oncli 阅读全文
posted @ 2019-12-20 21:54 林中有风 阅读(278) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-e 阅读全文
posted @ 2019-12-15 15:16 林中有风 阅读(397) 评论(0) 推荐(0)
摘要:javaScript有三种数据存储方式,分别是: sessionStorage localStorage cookier 相同点:都保存在浏览器端,同源的 不同点: ①传递方式不同 cookie数据始终在同源的http请求中携带(即使不需要),即cookie在浏览器和服务器间来回传递。 sessio 阅读全文
posted @ 2019-12-13 14:53 林中有风 阅读(504) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>事件委托</title> </head> <body> <div style="width: 500px;height: 300px;border: 2px s 阅读全文
posted @ 2019-12-13 14:30 林中有风 阅读(554) 评论(0) 推荐(0)
摘要:processID = () => { const uuid = 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { const r = Math.random() * 16 | 0, v = c == 'x' 阅读全文
posted @ 2019-12-13 14:11 林中有风 阅读(1013) 评论(0) 推荐(0)
摘要:URL.createObjectURL() 静态方法会创建一个 DOMString,其中包含一个表示参数中给出的对象的URL。这个 URL 的生命周期和创建它的窗口中的 document 绑定。这个新的URL 对象表示指定的 File 对象或 Blob 对象。 URL.createObjectURL 阅读全文
posted @ 2019-12-13 14:04 林中有风 阅读(5411) 评论(0) 推荐(0)
摘要:单纯的事件与获取 <input type="file" name="file" id="fileUpload"> <img id="preview" src=""/> jQuery $("#fileUpload").change(function () { console.log($("#fileU 阅读全文
posted @ 2019-12-13 13:55 林中有风 阅读(1684) 评论(0) 推荐(0)
摘要:函数式编程 顾名思义就是不依赖外界影响而变化,只依靠自身的输入和输出来得到自己想要的 例子1 var arr = [{name:'123'}] function add(_arr) { var obj= {name: 'cst'} var newArr = [] for(var i = 0; i < 阅读全文
posted @ 2019-12-13 10:20 林中有风 阅读(98) 评论(0) 推荐(0)
摘要:strings.HasPrefix(s string, prefix string) bool:判断字符串s是否以prefix开头 strings.HasSuffix(s string, suffix string) bool:判断字符串s是否以suffix结尾。 strings.Index(s s 阅读全文
posted @ 2019-12-11 23:20 林中有风 阅读(922) 评论(0) 推荐(0)
摘要:import ( "bufio" "fmt" "os" "strings" ) func multi(str1, str2 string) (result string) { if len(str1) == 0 && len(str2) == 0 { result = "0" return } va 阅读全文
posted @ 2019-12-10 23:33 林中有风 阅读(620) 评论(0) 推荐(0)
摘要:1. FeHelper 格式化 官网:https://www.baidufe.com/fehelper Github:https://github.com/zxlie/FeHelper ##扩展功能: - JSON自动美化(页面自动检测并格式化) - JSON手动美化(粘贴文本、手动格式化) - J 阅读全文
posted @ 2019-12-10 16:24 林中有风 阅读(206) 评论(0) 推荐(0)
摘要:执行规定一段时间后执行 <input type="text" id="inp" /> <script> var oInp = document.getElementById("inp") var timer = null; function ajax(e) { // 需要执行的函数 console. 阅读全文
posted @ 2019-12-08 14:47 林中有风 阅读(161) 评论(0) 推荐(0)
摘要:<div id="show">0</div> <button id="btn">click</button> <script> var oDiv = document.getElementById('show') var oBtn = document.getElementById('btn') f 阅读全文
posted @ 2019-12-08 14:13 林中有风 阅读(733) 评论(0) 推荐(0)
摘要:// 用n的阶乘来演示 保存上一步计算的数据,进行下一次计算时候先判断是否有上次执行过的,如果有直接获取保存的值然后再进行下一步计算 // n! n*(n-1)*....*2*1 // 0! = 1 // n! = n*(n-1)! // 实现记忆前 var count = 0 // 执行的次数 f 阅读全文
posted @ 2019-12-07 15:56 林中有风 阅读(322) 评论(0) 推荐(0)