+ 2
How do you use a code in html using javascript?somebody to help pliz for example use input id password in html using an if else
2 Réponses
+ 7
If you don't want your script to be placedinside a function, or if your script should write page content, it should be placed in the body section. Head, or before closure of body tag. When DOM loads JS is then executed, that is exactly what jQuery document.ready does. I always put my scripts in the header.
https://www.w3schools.com/js/js_whereto.asp
+ 8
https://www.sololearn.com/learn/JavaScript/2752/