0
Please. Help me get the value of an input field in javascript. The code i wrote is giving me an error message.
Here is the code https://code.sololearn.com/WY2QttJ7wbmS/?ref=app
2 Réponses
+ 2
The js code run when the page load, not when button is clicked
You need to add onclick attribute on button like
onclick = "function_name()"
& Then put your js code inside
function function_name(){
//Here
}