0

How does the html reference the JS?

I can't seem to use getContext with this app

3rd Sep 2022, 6:00 PM
唐杰豪
唐杰豪 - avatar
2 odpowiedzi
0
You can find it by document.getElementById("id")
3rd Sep 2022, 6:47 PM
Евгений Молдованов
Евгений Молдованов - avatar
0
you have to wrap you javascript inside window.onload = () =>{ *** your code ** } in the javascript tab, to make sure the html is loaded first so that the javascript can find the DOM elements.
4th Sep 2022, 1:24 PM
Bob_Li
Bob_Li - avatar