0

How I give the value of name to x

I give x the value of name by giving same id but it does not work. https://code.sololearn.com/Wbd3dpfV8PA9/?ref=app https://code.sololearn.com/Wbd3dpfV8PA9/?ref=app

21st Jul 2023, 1:39 PM
Raj Singh
Raj Singh - avatar
2 Respostas
+ 3
Some minor mistake in javascript code: let x that line write in function and when you write document.getElementById().value then name print in double quotes Hope you will understand
21st Jul 2023, 1:49 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 3
The value of x should be get when event occurs so get value inside the function.
21st Jul 2023, 2:25 PM
A͢J
A͢J - avatar