Prev Demo
Fillrect()
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <body> <canvas id="myCanvas" width="200" height="100" style="border:8px solid blue;"> </canvas> <script> var a = document.getElementById("myCanvas"); var b = a.getContext("2d"); b.fillRect(40, 20, 50, 100); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output