问题描述
如何将div标签的内容转换为图片并通过javascript保存到本地文件夹?我知道必须有出路,但我无法找到它。任何帮助将不胜感激 。
Canvas。 drawImage
支持Image,Canvas和视频元素。有些人说,它可能会支持DOMElement。
有很多以C(或C ++)编写的开源浏览器。有项目,可以将C ++代码转换为Javascript。因此,您可以在浏览器中运行您自己的浏览器并使用它来呈现您的HTML。
在浏览器内部运行浏览器根本不奇怪。例如。有一个项目,它在浏览器中模拟x86机器 - 。
How to convert the content of a div tag to an image and save it to a local folder via javascript ? I know there must be a way out but i am unable to find it . Any help would be greatly appreciated . Thanks in advance.
Canvas.drawImage
supports Image, Canvas and Video elements. Some people say, that it may support DOMElement in the future.
There are many open-source browsers written in C (or C++). There is Emscripten project, which can convert C++ code to Javascript. So you can run your own browser inside a browser and use it to render your HTML.
Running browser inside a browser is not strange idea at all. E.g. there is a project, that emulates x86 machine in a browser - http://copy.sh/v24/.
这篇关于通过javascript将div内容转换为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!