<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="drawing" width="200" height="200">A drawing of something</canvas>
<script>
window.onload=function(){
var drawing=document.getElementById("drawing");
if(drawing.getContext)
{
var context=drawing.getContext("2d");
context.beginPath();
//绘制圆弧
context.arc(50,50,0,Math.PI/2,false);
context.stroke();
}
}
</script>
</body>
</html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="drawing" width="200" height="200">A drawing of something</canvas>
<script>
window.onload=function(){
var drawing=document.getElementById("drawing");
if(drawing.getContext)
{
var context=drawing.getContext("2d");
context.beginPath();
//绘制圆弧
context.arc(50,50,0,Math.PI/2,false);
context.stroke();
}
}
</script>
</body>
</html>