复制代码 代码如下:
<canvas id="myCanvas" width=”300” height=”200” style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.
</canvas>
<script type="text/javascript">
var myCanvas = document.getElementById("myCanvas");
if (!myCanvas.getContext)
{
alert("你的浏览器不支持Canvas.");
}
else
{
alert("你的浏览器支持Canvas.");
}
</script>
<canvas id="myCanvas" width=”300” height=”200” style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.
</canvas>
<script type="text/javascript">
var myCanvas = document.getElementById("myCanvas");
if (!myCanvas.getContext)
{
alert("你的浏览器不支持Canvas.");
}
else
{
alert("你的浏览器支持Canvas.");
}
</script>
标签:
浏览器,html5,canvas
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“js判读浏览器是否支持html5的canvas的代码”评论...