为什么我五角星出不来 ?检查了好多遍了
<body>
<canvas id="canvas" style="border:1px solid #000;display:block">
</canvas>
<script>
window.onload=function(){
var canvas=document.getElementById("canvas");
canvas.width=800;
canvas.height=800;
var context=canvas.getContext('2d');
context.beginPath();
for(var i=0;i<5;i++){
context.lineTo(Math.cos((18+i*72)/180*Math.PI)*300+400,
-Math.sin((18+i*72)/180*Math.PI)*300+400);
context.lineTo(Math.cos((18+i*72)/180*Math.PI)*150+100,
-Math.sin((18+i*72)/180*Math.PI)*150+100);}
context.closePath();
context.lineWidth=10;
}
</script>
</body>