不能运行结果
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<canvas id="canvas" style="border:1px solid #aaa; display: block; margin: 50px auto;"></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((54+i*72)/180*Math.PI)*150+400),
(-Math.sin((54+i*72)/180*Math.PI)*150+400));
}
context.closePath();
context.lineWidth=10;
context.stroke();
</script>
</body>
</html>