The proprietie onclik is obsolete. I use addEventListener, here is an example => myVariable.addEventListener('click', myFunction);
What is the equivalant for the proprietie onload ?
The proprietie onclik is obsolete. I use addEventListener, here is an example => myVariable.addEventListener('click', myFunction);
What is the equivalant for the proprietie onload ?
Its about a similar syntax
object.addEventListener("load", myScript);
Reference:
[1] https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event