随笔分类 -  js

摘要:// 数据流处理 let blobType = switchType(fileFmt); const blob = new Blob([result.data],{ type: blobType }); let blobURL= window.URL.createObjectURL(blob); w 阅读全文
posted @ 2024-06-06 10:19 star-meteor 阅读(16) 评论(0) 推荐(0)
摘要:this的指向,是在函数被调用的时候确定的。也就是执行上下文被创建时确定的。 阅读全文
posted @ 2021-05-31 18:48 star-meteor 阅读(38) 评论(0) 推荐(0)
摘要:对象进行合并 var a={a:'1'}; var b = {b: '2'}; Object.assign(a,b); a {a: "1", b: "2"} b {b: "2"} 或 var c= Object.assign({},a,b); c {a: "1", b: "2"} 对数组进行合并 v 阅读全文
posted @ 2020-10-29 16:52 star-meteor 阅读(246) 评论(0) 推荐(0)
摘要:字符串自动补全padStart()、padEnd() 阅读全文
posted @ 2020-10-10 16:52 star-meteor 阅读(83) 评论(0) 推荐(0)
摘要:undefined,null,'',false,0,NaN 阅读全文
posted @ 2020-08-18 14:52 star-meteor 阅读(1328) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2020-08-13 10:04 star-meteor 阅读(0) 评论(0) 推荐(0)
摘要:npm install js-cookie --save import Cookies from 'js-cookie' 使用 1.存入cookies //创建一个cookie Cookies.set('name', 'value'); // 创建一个cookie,从现在起7天 Cookies.se 阅读全文
posted @ 2020-05-13 11:26 star-meteor 阅读(560) 评论(0) 推荐(0)
摘要:var u = navigator.userAgent; if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {//安卓手机 alert("安卓手机"); } else if (u.indexOf('iPhone') > -1) {// 阅读全文
posted @ 2020-05-07 18:58 star-meteor 阅读(619) 评论(0) 推荐(0)