html5画布=圆

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script type="text/javascript">
window.onload = function()
{
alert("");
var c = document.getElementById("chacktext");
alert(c)
//进行2d绘画
var myc =c.getContext("2d");
alert(myc);
myc.fillStyle="#FF0000"
myc.arc(100,75,50,0,2*Math.PI);
myc.fill();
}
</script>

</head>
<body>
<canvas id="chacktext" style="border: red 1px solid;"></canvas>
</body>
</html>

你可能感兴趣的:(html5,圆)