Display text of text box after pressing submit button using html and javascript. iam not getting output.what is missing? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Display text of text box after pressing submit button using html and javascript. iam not getting output.what is missing?

<HTML> <body> <label> name </label> <label id='text'> </label> <button onclick='document.getElementbyID'('text').txt>submit</button> </body> </html>

28th Sep 2017, 7:46 AM
Kaushik Sawant
Kaushik Sawant - avatar
2 Answers
0
<HTML> <body> <label>name</label> <input id="text" /> <button onclick="document.getElementById('text').InnerText">submit</button> </body> </html>
28th Sep 2017, 11:56 AM
Calviղ
Calviղ - avatar
+ 1
First You should replace the second <label> with <input>
28th Sep 2017, 8:27 AM
T0nd3