通过Chrome控制台从页面保存/复制到剪贴板图像 [英] Save/copy to clipboard image from page by chrome console
问题描述
对于我的项目,我需要从以下位置复制图像 (不是url,图像名称.仅用于功能数据,例如,将其粘贴到"Microsoft Paint") Chrome控制台将页面转到剪贴板.
For my project I need to copy image (not url, image name. Only data for ability, for example, to paste it to "Microsoft Paint") from page to clipboard by Chrome console.
我尝试过:
copy(document.getElementById('someimage'));
但是它什么也没返回……仅适用于文本.
but it returns nothing... It only works with text.
如果您不知道,那么如何通过chrome控制台下载此图像?
If you don't know, then how to download this image by chrome console?
OR
如何制作页面截图并使用Chrome控制台复制或下载?
How to make screenshot of the page and copy or download it using Chrome console?
P.s.我不能使用任何js库.
P.s. I can't use any js libraries.
推荐答案
内置的功能可以完成许多常见的工作;)
there is built in feature to do many common things ;)
#noLibrary #builtInFeature
#noLibrary #builtInFeature
- CTRL + SHIFT + P
- https://umaar.com/dev-tips/98-command-菜单/
https://umaar.com/dev-tips/151-screenshot-捕获/
这篇关于通过Chrome控制台从页面保存/复制到剪贴板图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!