I am learning good practices with JavaScript (by the way, if you have articles about this to recommend me, I will be grateful: D), and I have some questions about:
onsubmit(), onclick()and other built-in functions- What if a variable
global open() method
About 1 and 2
I have a form on my HTML page and I used this method:
<form name="myForm" onsubmit="myFunction();">
Inline JS is bad practice and I have to remove it. So, I deleted onsubmit="myFunction();"and added to my JS (to an external file):
var form = document.myForm;
form.onsubmit = function myFunction() { };
But...
1. Why is my code not working? Should I use window.onloadbefore? Sometimes I donโt know when I should use it.
2. , (, form ). ?
3
3. URL-, , . , open() . ? , ?