+ 1

i am not beginner but How to create a button inside a canvas😅 ( html),and how to publish the site in internet for free?

I couldn't make a button inside canvas,my html page is a game and the whole body is a canvas!

30th Dec 2021, 3:26 PM
Potato22
2 Answers
+ 2
1_Draw the button and store its coords, then attach an onclick event callback function on the canvas, then use an if-else if-else statement to check where the click event was triggered and use the right function of the button 2_the best free web hoster in the internet is InfinityFree, you may check it if you want
31st Dec 2021, 9:52 PM
VCoder
VCoder - avatar
- 1
Use replit.com for goot hosting
18th Jan 2022, 6:31 PM
Chris
Chris - avatar