html5中的问题

fpfos 2012-09-05 10:54:59
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>html5</title>
</head>

<body>
<canvas id="ht" width="200" height="100" style="border:#FF0000 1px solid">你的浏览器不支持 Canvas 标签</canvas>
</body>
<script language="javascript" src="../网页特效大赛/js/jquery-1.4.min.js"></script>
<script language="javascript">
var ctx = $('#ht').getContext("2d");
ctx.fillStyle = 'red';
ctx.beginPath();
ctx.arc(400,600,15,0,Math.PI*2,true);
ctx.closePath();
ctx.fill();
</script>


</html>



大家看看我这个为什么没有效果啊, 我用的是谷歌浏览器 , 在线等待,谢谢哈
...全文
59 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
「已注销」 2012-09-06
  • 打赏
  • 举报
回复
你用的是xhtml1.0 哪是什么html5,当然不支持canvas了。。。

10,606

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 其他
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧