paste.html 粘贴图片 代码备份
paste.html 粘贴图片 代码备份
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<img id="pasteImg" />
<script>
document.addEventListener('paste', async (e) => {
const clipboardData = e.clipboardData;
const items = clipboardData.items;
for (const item of items) {
if (item.type.startsWith('image/')) {
const blob = await item.getAsFile();
const reader = new FileReader();
reader.readAsDataURL(blob);
reader.onload = function () {
const base64Data = reader.result;
document.getElementById('pasteImg').src = base64Data;
};
}
}
});
</script>
</body>
</html>
---------------------------------------------
生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!
https://pengchenggang.gitee.io/navigator/
SMART原则:
目标必须是具体的(Specific)
目标必须是可以衡量的(Measurable)
目标必须是可以达到的(Attainable)
目标必须和其他目标具有相关性(Relevant)
目标必须具有明确的截止期限(Time-based)
生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!
https://pengchenggang.gitee.io/navigator/
SMART原则:
目标必须是具体的(Specific)
目标必须是可以衡量的(Measurable)
目标必须是可以达到的(Attainable)
目标必须和其他目标具有相关性(Relevant)
目标必须具有明确的截止期限(Time-based)

浙公网安备 33010602011771号