title: How to take screenshot(image) in jQuery
body: <p>I have a graph displayed in form of Asp.net .apsx page. Now as per my requirement I have to save this form content as image in my system on button click. Here is my .aspx code..</p>
  
  <pre><code>&lt;form id="form1" runat="server"&gt;
  &lt;div style="padding-left:150px"&gt;
    &lt;asp:Literal ID="FCLiteral1" runat="server"&gt;&lt;/asp:Literal&gt;
  &lt;/div&gt;
  &lt;div style="padding-left:350px"&gt;&lt;b&gt;Demo&lt;/b&gt;&lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In this code a chart will be displayed. So I want to capture that chart as screenshot image in my system.How to do this in jQuery.. Please help.</p>
  
  <p>Here is the code in jQuery that i am trying to use to get the image in variable but button click event in jQuery is not getting fired..</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
        function capture() {
            $('#form1').html2canvas({
                onrendered: function (canvas) {
                    alert("Hii");
                    var img_val;
                    $('#img_val').val(canvas.toDataURL("image/png"));
                    document.getElementById("form1").submit();
                    alert("Hii");
                }
            });
        }
    &lt;/script&gt;  
  
  &lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
  &lt;div style="padding-left:150px"&gt;
    &lt;asp:Literal ID="FCLiteral1" runat="server"&gt;&lt;/asp:Literal&gt;
  &lt;/div&gt;
  &lt;div style="padding-left:350px"&gt;&lt;b&gt;Demo&lt;/b&gt;&lt;/div&gt;
  &lt;/form&gt;
  
   &lt;input type="submit" value="Take Screenshot Of Div" onclick="capture();" /&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>Please help me.</p>