<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Canvas练习</title>
</head>
<body>
<canvas id="myCanvas" style="border:1px solid" width="300" height="150">
您的浏览器不支持canvas元素,请更新或更换您的浏览器。
</canvas>
<script type="text/javascript">
var c=document.getElementById("myCanvas");
var context=c.getContext("2d");
context.fillStyle="#FF00FF";
context.beginPath();
context.arc(100,75,50,0,Math.PI*2,true);
context.closePath();
context.fill();
</script>
</body>
</html>