varqpan=qp.getContext
("2d");var
width=qp.width,height=qp.height;qpan.beginPath();qpan.strokeStyle='red';qpan.lineWidth=6;qpa2、n.rect(0,0,width,height);qpan.stroke();qpan.closePath();qpan.lineWidth=1;qpan.rect(6,6,width-
12,height-2);qpan.stroke();for(i=0;i<=7;i++){varbegin=56;varwhole=begin
+i*50;qpan.beginPath();qpan.moveTo(whole,7);qpan.lineTo(whole,206);qpan.closePath();qpan.stroke();qpan.beginPath();qpan.moveTo
3、(whole,256);qpan.lineTo(whole,height-7);qpan.closePath();qpan.stroke();}for(i=0;i<=8;i++){varbegin=56;varwhole=begin
+i*50;qpan.beginPath();qpan.moveTo(7,whole);qpan.lineTo(width-7,whole);qpan.closePath();qpan.stroke();}qpan.beginPath();functionlhome(x,y){qpan.moveTo(x,y);qpan.lineTo(x+100,y
4、
+100);qpan.lineWidth=2;qpan.stroke();}functionrhome(x,y){qpan.moveTo(x,y);qpan.lineTo(x-100,y
+100);qpan.lineWidth=2;qpan.stroke();}functionrcenter(x,y){qpan.beginPath();qpan.moveTo(x+4,y-
12);qpan.lineTo(x+4,y-
3);qpan.lineTo(x+13,y-
3);qpan.stroke();qpan.beginPath();qpan.moveTo(x+4,y
+12)
5、;qpan.lineTo(x+4,y
+3);qpan.lineTo(x+13,y
+3);qpan.stroke();}functionlcenter(x,y){qpan.beginPath();qpan.moveTo(x-4,y-
12);qpan.lineTo(x-4,y-
3);qpan.lineTo(x-13,y-
3);qpan.stroke();qpan.beginPath();qpan.moveTo(x-4,y
+12);qpan.lineTo(x-4,y
+3);qpan.lineTo(x-13,y
+3);qpan.stroke();}varsite=new
6、Array();site=[[56,106],[356,106],
[106,156],[206,156],[306,156],[56,356],[356,356],
[106,306],[206,306],[306,306]];for(i=0;i7、6,6);lhome(156,356);rhome(256,356);qpan.beginPath();qpan.font="30pxArial";qpan.strokeText("楚
河",56,241);qpan.beginPath();qpan.strokeText("漢
界",256,241);