上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 31 下一页
摘要: => ES8 2017 '1'.padStart(2, '*') // '*1''1'.padEnd(2, '*') // '1*''1'.padStart(6, '*#') // '*#*#*1' => ES8 2017 let obj = {name: 'james', age: 22, sex 阅读全文
posted @ 2020-08-05 23:16 James2019 阅读(107) 评论(0) 推荐(0)
摘要: 以下是官方文件上传文档 https://github.com/eggjs/egg-multipart https://eggjs.org/zh-cn/plugins/multipart.html . 阅读全文
posted @ 2020-08-01 23:30 James2019 阅读(2079) 评论(0) 推荐(0)
摘要: 1、js截取两个字符串之间的内容: varstr = "aaabbbcccdddeeefff"; str = str.match(/aaa(\S*)fff/)[1]; console.log(str);//结果bbbcccdddeee 2、js截取某个字符串前面的内容: varstr = "aaa/ 阅读全文
posted @ 2020-07-28 07:43 James2019 阅读(5950) 评论(0) 推荐(0)
摘要: cron的表达式被用来配置CronTrigger实例。 cron的表达式是字符串,实际上是由七子表达式,描述个别细节的时间表。这些子表达式是分开的空白,代表: 1. Seconds 2. Minutes 3. Hours 4. Day-of-Month 5. Month 6. Day-of-Week 阅读全文
posted @ 2020-07-25 07:05 James2019 阅读(293) 评论(0) 推荐(0)
摘要: 打开浏览器控制台: var js = window.document.createElement('script'); js.setAttribute('src', 'https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js'); js. 阅读全文
posted @ 2020-07-15 13:54 James2019 阅读(1117) 评论(0) 推荐(0)
摘要: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Symbol https://www.jianshu.com/p/fd76d308b742 阅读全文
posted @ 2020-07-09 16:51 James2019 阅读(209) 评论(0) 推荐(0)
摘要: 参数默认值 function decimal(num, fix = 2) { return +num.toFixed(fix); } 模板字符串 解构赋值 // 函数入参默认值解构function example({x, y, z = 0}) { return x + y + z; } consol 阅读全文
posted @ 2020-07-08 13:25 James2019 阅读(127) 评论(0) 推荐(0)
摘要: gzip压缩原理 https://segmentfault.com/a/1190000012571492?utm_source=tag-newest //关闭 webpack 的性能提示 https://blog.csdn.net/yun_hou/article/details/87818475 / 阅读全文
posted @ 2020-07-01 16:42 James2019 阅读(151) 评论(0) 推荐(0)
摘要: ES5:(有重复,所以判断数组或对象等,就会有问题) typeof 1 > 'number' typeof 'hello' > 'string' typeof alert > 'function' typeof [1,2,3] > 'object' typeof {a:1,b:2} > 'objec 阅读全文
posted @ 2020-05-27 11:37 James2019 阅读(590) 评论(0) 推荐(0)
摘要: drawText("Hello, World!What a nice day.",0,30,110); function drawText(t,x,y,w){ var chr = t.split(""); var temp = ""; var row = []; context.font = "20 阅读全文
posted @ 2020-04-13 14:31 James2019 阅读(1395) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 31 下一页