Is there a way to export the content in DIV to a image programmatically?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/60455/take-a-screenshot-of-a-webpage-with-javascript">Take a screenshot of a webpage with javascript?</a>  </p>
</blockquote>



<p>I hope to export the content in DIV to a image programmatically? How can I do? which code can do that ,server code or client code?
Thanks! </p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
     &lt;div id="a"&gt;
       Content to export to image
     &lt;/div&gt;

     &lt;div id="b"&gt;
       Normal text
     &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
