+ 2

where is positioned the script inside Html tab when it is made in JS tab, codeplayground?

because when I place the script directly before </body> it works, but when I place in the JS tab in codeplayground, I need to "window.onload" for it works, so what is script's position inside html tab, when it is made in Js tab? code: https://code.sololearn.com/WIUa79ydJJMp/#html surged by this question: https://www.sololearn.com/Discuss/400974/why-only-one-button-works-and-the-other-doesn-t

20th May 2017, 4:56 PM
ysraelcon
ysraelcon - avatar
2 Respostas
+ 2
its inside the body tag.
20th May 2017, 9:03 PM
Dunja Cetkovic
Dunja Cetkovic - avatar
+ 1
This is working well for me: <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <button id="btn_make" onclick="make()" >make</button> <button id="btn_call" onclick="f_call()">call</button> </body> </html> Just put your functions into the js tab
20th May 2017, 4:52 PM
nouseforname
nouseforname - avatar