I am currently playing with html5 canvas, a simple code below:
<!DOCTYPE HTML> <html> <head> <title></title> <script src="Scripts/jquery-2.0.3.min.js"></script> <script> $(function () { </script> </head> <body> <div style="width:200px; height:200px; margin:0 auto; padding:5px;"> <canvas id="cv" width="200" height="200" style="border:2px solid black"> Your browser doesn't support html5! Please download a fitable browser. </canvas> </div> </body> </html>
The canvas element can only be selected by the document.getElementById method, but the jQuery method does not work. Is there a way to get the original html from a jquery object, or am I missing something? Thanks in advance!
Erxin source share