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

24th Jan 2020, 4:06 AM
Victor Sayi
Victor Sayi - avatar
2 ответов
+ 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 }
24th Jan 2020, 5:04 AM
Twaatii
Twaatii - avatar