贝塞尔曲线:
<head> <meta charset="utf-8"> <title>无标题文档</title> <script type="text/ecmascript"> function draw(){ var canvas=document.getElementById("test"); if(canvas.getContext){ var ctx=canvas.getContext("2d"); ctx.moveTo(75,25); //曲线起始位置 ctx.quadraticCurveTo(10,30,0,150); //曲线控制点的位置,曲线终点位置 ctx.stroke(); }; }; </script> </head> <body onLoad="draw();"> <canvas id="test" width="150" height="150"></canvas> </body>