create screenshot of webpage using html2canvas (unable to initialize properly)

后端 未结 5 2145
醉酒成梦
醉酒成梦 2020-12-01 06:03

I am attempting to use http://html2canvas.hertzen.com/ to take screenshots of my webpage. I am unable to initialize a canvas element using...

var canvas = $         


        
5条回答
  •  伪装坚强ぢ
    2020-12-01 06:29

    You can use the following code to capture a screenshot and download the screenshot.

    html button creation

    
    
    

    function definition

    
    

    note: I have created a html button where I have called the function. test is an attribute and box1 is to get the canvas elements.

提交回复
热议问题