代码如下:

context.moveTo(100,100);
context.lineWidth = 5;
context.strokeStyle = "#ff0000";
context.lineTo(100,400);
context.lineTo(400,400);
context.stroke();

HTML5绘图基础_03_绘制连续线条_html5