摘要: 1、compress(img) 传入要压缩的图片元素,返回一个base64 例如: compress(document.getElementById("img")) // 图片压缩 function compress(img) { let canvas = document.createElemen 阅读全文
posted @ 2020-05-22 17:51 男孩亮亮 阅读(1354) 评论(0) 推荐(0)
摘要: 点击按钮复制文本(这里取用点击事件触发copy方法,加载页面直接调用会copy失败) function copy() { const input = document.createElement('input'); document.body.appendChild(input); //“啦啦啦”是 阅读全文
posted @ 2020-05-22 14:38 男孩亮亮 阅读(527) 评论(0) 推荐(0)