<!doctype html> <html> <head> <script> function my_clicked(){ const canvas = document.getElementById("mycanvas"); const ctx = canvas.getContext("2d"); ctx.lineWidth = 10; ctx.strokeRect(0, 0, canvas.width, canvas.height);
} </script>
</head> <body> <canvas id="mycanvas" width="250" height="250"></canvas> <br> <input type="button" onclick="my_clicked()" value="обрамить канвас">
</body> </html>