html5画布=圆

<!DOCTYPEhtml>

<html>

<head>

<metacharset="utf-8"/>

<title></title>

<scripttype="text/javascript">

window.onload=function()

{

alert("");

varc=document.getElementById("chacktext");

alert(c)

//进行2d绘画

varmyc=c.getContext("2d");

alert(myc);

myc.fillstyle="#FF0000"

myc.arc(100,75,50,0,2*Math.PI);

myc.fill();

}

</script>

</head>

<body>

<canvasid="chacktext"style="border:red1pxsolid;"></canvas>

</body>

</html>

相关推荐