+ 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
2 Antworten
+ 2
its inside the body tag.
+ 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