jb51
<script> <BR>var canvas_jb51=$("#jb51"); <BR>alert(canvas_jb51); <BR>alert(document.getElementById("jb51")); <BR>var jb51_2d=canvas_jb51.getContext("2d"); <BR>var jb51_img=new Image(); <BR>jb51_img.src="images/Boston-III-48px.png"; <BR>jb51_2d.drawImage(jb51_img,0,0); <BR></script>
两个alert()分别显示为:[object Object]和[object HTMLCanvasElement]。从这里,不难看出,$("#jb51")并没有像我预想的那样。再用firebug调试看一下,