如何拍摄网页的屏幕截图? [英] How to take a screen shot of a web page?
本文介绍了如何拍摄网页的屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我们的某个网站上添加一个按钮,允许用户向我们的错误跟踪系统提交错误。
I want to add a button to one of our web sites that will allow the user to file a bug with our bug tracking system.
其中一项功能请求是否有相关页面的屏幕上限。
One of the feature requests is that a screen cap of the page in question be sent along.
如果没有在最终用户计算机上安装,我该怎么办? javascript是否有某种屏幕上限api?
Without installing something on the end users machine, how can I do this? Does javascript have some sort of screen cap api?
推荐答案
你可以获取 innerHTML $ c页面的$ c>然后在服务器上处理它:
You may grab the innerHTML
of the page and then process it on the server:
document.getElementsByTagName('html')[0].innerHTML;
// this would also be interactive (i.e. if you've
// modified the DOM, that would be included)
这篇关于如何拍摄网页的屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文