HTML5画布-LMLPHP

<canvas id="myCanvas" width="500" height="300" style="border:1px solid black"></canvas>
    <script>
      var c=document.getElementById("myCanvas");
      var cxt = c.getContext("2d");
      // cxt.fillStyle="black";
      // cxt.fillRect(0,0,100,100);
      cxt.moveTo(0,0);
      cxt.lineTo(150,50);
      cxt.moveTo(150,50);
      cxt.lineTo(200,300);
      cxt.stroke();
    </script>

05-11 13:32