+ 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 Answers
+ 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/