开发者

Take snapshot of the <div> using js/jquery/java/active x or anything else?

开发者 https://www.devze.com 2023-04-10 13:00 出处:网络
Basically, the task is simple, but I\'m stuck on implementation. I need to take snapshot of the part of the page <div> using any tool(s) available (as long as it doesn\'t require any special ins

Basically, the task is simple, but I'm stuck on implementation. I need to take snapshot of the part of the page <div> using any tool(s) available (as long as it doesn't require any special installations and no flash (sorry adobe)).

Goal: Take snapshots of the <div> so that we can display it as a thumbnail/link of that subpage (any kind of image). <div> is sometimes may be flexible and always on the center of the page (so x&y window coordinates won't work), so it wo开发者_运维百科uld be great if it's based on id or class of the <div>

Any help would be much appreciated!


I would take a look at the HTML to canvas JavaScript library.

The only issue you are going to have is that it will show you the div as it is rendered by the HTMLToCanvas rendering engine, not as it is rendered by, say Firefox 3.6.3 with the Digg plugin installed on a Mac OS X 10.6.7.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号