Help me | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Help me

Здравствуйте! Мне нужна помощь. Я создал форму и привязал к ней событие onclick. Теперь мне нужно чтобы весь текст введённый в эту форму отображался в alert. Как это сделать подскажите пожалуйста. Hello, I need help. I created a form and tied to it event onclick. now I need to the entire text entered in this form displayed in the alert. how to do it prompt please

25th May 2018, 1:44 PM
DaZzle
3 Answers
+ 14
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <input type="text" id="get"> <button onclick="display()">Display</button> <script> function display(){ var x=document.getElementById("get").value; alert(x) } </script> </body> </html>
25th May 2018, 2:52 PM
STRIKER
+ 9
Donna somebody downvoting 😓
25th May 2018, 2:32 PM
Charan Leo25
Charan Leo25 - avatar
+ 7
Help me Hello! I need help. I created the form and attached the onclick event to it. Now I need all the text entered in this form to be displayed in alert. How do I do this? @translate
25th May 2018, 2:26 PM
Charan Leo25
Charan Leo25 - avatar