Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script type="text/javascript">
- function createImage() {
- var canvas = document.getElementById("canvas");
- var ctx = canvas.getContext("2d");
- ctx.strokeRect(20, 20, 50, 50);
- ctx.fillRect(80, 80, 50, 50);
- // for future changes
- }
- </script>
- </head>
- <body onload="createImage();">
- <canvas id="canvas" style="border: 2px solid black" width="200" height="200"> </canvas>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement