上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: 强制类型转换 包括Number()、parseInt()、parseFloat()、toString()、String()、Boolean(),这几种方法都比较类似。 Number() 如果是数字,返回自身 如果是布尔值,true为1,false为0 如果是null,返回0 如果是undefined 阅读全文
posted @ 2021-07-20 10:34 懒懒同学不懒 阅读(82) 评论(0) 推荐(0)
摘要: typeof 最常用的一种 console.log(typeof 1) //'number' console.log(typeof '1') //'string' console.log(typeof undefined) //'undefined' console.log(typeof true) 阅读全文
posted @ 2021-07-19 11:19 懒懒同学不懒 阅读(57) 评论(0) 推荐(0)
摘要: 参考:https://jelly.jd.com/article/6006b1025b6c6a01506c8783 阅读全文
posted @ 2021-07-15 11:46 懒懒同学不懒 阅读(45) 评论(0) 推荐(0)
摘要: 前7种为基础类型:存储在栈内存,做比较时为值的比较。 object为引用类型:存储在堆内存,做比较时为引用地址的比较。 题目一: let a = { name: 'Julia', age: 20 } function change(o) { o.age = 24; o = { name: 'Kath 阅读全文
posted @ 2021-07-13 19:11 懒懒同学不懒 阅读(68) 评论(0) 推荐(0)
摘要: 参考链接:https://cloud.tencent.com/developer/article/1557489 公司项目规定node版本必须为10,在此基础上安装tailwind npm install tailwindcss@1.1.4 --save 安装postcss插件 npm i @ful 阅读全文
posted @ 2021-06-23 15:12 懒懒同学不懒 阅读(1230) 评论(0) 推荐(0)
摘要: 使用webpack-bundle-analyzer可以直观分析打包结果。 1、安装 npm install --save-dev webpack-bundle-analyzer 2、在vue.config.js中配置 if (process.env.NODE_ENV 'production') { 阅读全文
posted @ 2021-06-21 11:22 懒懒同学不懒 阅读(3109) 评论(0) 推荐(0)
摘要: 参考:https://segmentfault.com/a/1190000016496448 https://www.jianshu.com/p/ed86f78dc3fe 阅读全文
posted @ 2021-05-14 17:23 懒懒同学不懒 阅读(49) 评论(0) 推荐(0)
摘要: 只读属性,返回document的加载状态。有三个可能的值 loading 仍在加载 interactive 文档加载完成,解析完成,但图片、样式表等外部资源可能仍在加载。DOMContentLoaded即将发生 complete 文档与所有子资源都完成加载。load事件即将触发 加载顺序 docum 阅读全文
posted @ 2021-05-11 10:58 懒懒同学不懒 阅读(1040) 评论(0) 推荐(0)
摘要: 参考链接:https://github.com/xiaoyu2er/blog/issues/8 两者都会并行下载,下载过程不会影响页面的解析。 普通script <script src="./test1.js"></script> <script src="./test2.js"></script> 阅读全文
posted @ 2021-05-10 14:27 懒懒同学不懒 阅读(137) 评论(0) 推荐(0)
摘要: 参考:https://segmentfault.com/a/1190000011468675 DOMContentLoaded html文档完全解析和加载完后执行,可能不会等待外部样式表与图片的加载。 DOM加载完毕,js可以访问DOM节点。 1. 由document对象触发 document.ad 阅读全文
posted @ 2021-05-08 14:34 懒懒同学不懒 阅读(155) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 13 下一页