摘要: 将HTML页面的图片(url)转化为文件对象(blob)进行处理,又不想通过a标签download下载时,可以通过发送请求图片地址转化为blob再进行处理 fetch(url) .then(response => response.blob()) .then(res => { // 处理res }) 阅读全文
posted @ 2021-02-24 10:09 等你下课啊 阅读(4793) 评论(0) 推荐(0)
摘要: HTML页面拖放功能的实现 监听drag和drop事件, 通过dataTransfer.setData()、dataTransfer.getData()方法传输所需数据 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <m 阅读全文
posted @ 2021-02-24 09:33 等你下课啊 阅读(198) 评论(0) 推荐(0)