<html>
<head>
</head>
<body>
<canvas id="canvas" width="500" height="500" style="border:1px solid #d3d3d3;"></canvas>
<script>
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var pos = 0;
for (let q = 65; q < 75;q++){
ctx.strokeRect(pos,15,20,24);
ctx.fillText(String.fromCharCode(q),pos+5,25);
pos = pos + 25;
}
pos = 0;
for (let q = 75; q < 85;q++){
ctx.strokeRect(pos,65,20,24);
ctx.fillText(String.fromCharCode(q),pos+5,75);
pos = pos + 25;
}
pos = 0;
for (let q = 85; q < 91;q++){
ctx.strokeRect(pos,115,20,24);
ctx.fillText(String.fromCharCode(q),pos+5,125);
pos = pos + 25;
}
ctx.strokeRect(pos,115,20,24);
ctx.fillText("<",pos+5,125);
pos = pos + 25;
ctx.strokeRect(pos,115,20,24);
ctx.fillText(">",pos+5,125);
pos = pos + 25;
ctx.strokeRect(pos,115,30,24);
ctx.fillText("end",pos+5,125);
</script>
</body>
|