<div class="codetitle"> <span><a style="CURSOR: pointer" data="57755" class="copybut" id="copybut57755" onclick="doCopy('code57755')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code57755"> <br><canvas id="myCanvas" width="”300”" height="”200”" style="border:1px solid #c3c3c3;"> <br>Your browser does not support the canvas element. <br></canvas> <br><script type="text/javascript"> <BR>var myCanvas = document.getElementById("myCanvas"); <BR>if (!myCanvas.getContext) <BR>{ <BR>alert("你的浏览器不支持Canvas."); <BR>} <BR>else <BR>{ <BR>alert("你的浏览器支持Canvas."); <BR>} <BR></script> <br> </div>