var canvas1 = document.getElementById("canvas1");
canvas1.width = 500;
canvas1.height = 500;
var context1 = canvas1.getContext('2d');
context1.moveTo(50,50);
context1.lineTo(450,450);
context1.moveTo(450,50)
context1.lineTo(50,450);
context1.lineTo(455,450);
context1.lineWidth = 20; //线条的宽度
context1.strokeStyle = '#660000'; //线条的颜色
context1.stroke();
}