会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
青老师
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
···
7
下一页
2023年11月17日
JavaScript Unicode转中文的方法
摘要: // 获取Unicode字符串const unicodeStr = String.fromCharCode(9731, 9733, 9842); // 解码Unicodeconst chineseStr = JSON.parse(`"${unicodeStr}"`); console.log(chi
阅读全文
posted @ 2023-11-17 09:22 青老师
阅读(263)
评论(0)
推荐(0)
2023年7月18日
es6
摘要: 13 个从 ES2021 到 ES2023 实用JavaScript 新特性技巧 (qq.com) 1.5万字概括ES6全部特性(已更新ES2020) - 掘金 (juejin.cn)
阅读全文
posted @ 2023-07-18 16:16 青老师
阅读(10)
评论(0)
推荐(0)
2023年7月14日
特殊类型 调用Number函数
摘要: // 特殊类型 null a = null; a = Number(a); console.log("null a转换后类型 = " + typeof a); console.log("null a转换后的值 = " + a); // 特殊类型 undefined a = undefined; a
阅读全文
posted @ 2023-07-14 09:28 青老师
阅读(6)
评论(0)
推荐(0)
parseInt
摘要: 比如parseInt("021",8); // ->17 但是,如果第一个参数如果是Number呢? 比如parseInt(021,8); // ->15 原因:直接把021当成十进制Number来做int解析,发现021是八进制数,变成十进制数是17,再对17按8进制数形式做int解析。即: pa
阅读全文
posted @ 2023-07-14 08:55 青老师
阅读(172)
评论(0)
推荐(0)
2023年7月13日
求js数组最大值
摘要: 1 let arr = [1, 2, 3, 4, 5] 2 3 let max = arr.reduce((prev, cur) => { 4 return Math.max(prev, cur) 5 }) 6 7 console.log(max) // expected output: 5 //
阅读全文
posted @ 2023-07-13 13:58 青老师
阅读(36)
评论(0)
推荐(0)
2023年7月12日
防抖,节流函数
摘要: // 防抖函数 function debounce(func, wait) { // 创建一个定时器 let timeout // 返回一个函数,这个函数会在一个时间区间结束后调用 func return function() { // 如果定时器还在运行,则清除定时器 timeout && cle
阅读全文
posted @ 2023-07-12 17:18 青老师
阅读(15)
评论(0)
推荐(0)
2023年7月11日
vue $attrs和$listeners的使用
摘要: vue $attrs和$listeners的使用 - 掘金 (juejin.cn)
阅读全文
posted @ 2023-07-11 14:12 青老师
阅读(15)
评论(0)
推荐(0)
2023年7月10日
作用域,闭包,原型链,类,继承
摘要: JavaScript作用域和闭包 - 程序猿的程 - 博客园 (cnblogs.com) 详谈JavaScript原型链 - 程序猿的程 - 博客园 (cnblogs.com) 详谈Javascript类与继承 - 程序猿的程 - 博客园 (cnblogs.com)
阅读全文
posted @ 2023-07-10 16:25 青老师
阅读(7)
评论(0)
推荐(0)
js原型链
摘要:
阅读全文
posted @ 2023-07-10 16:17 青老师
阅读(9)
评论(0)
推荐(0)
2021年4月25日
vscode中vue单文件组件快捷初始化模板:vue+tab
摘要: { "Print to console": { "prefix": "vue", "body": [ "<template>", "<div>\n", "</div>", "</template>\n", "<script>", "export default {", " name: '',", &qu
阅读全文
posted @ 2021-04-25 12:00 青老师
阅读(286)
评论(0)
推荐(0)
1
2
3
4
5
···
7
下一页
公告