How to make the print the content of the button on the same page? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How to make the print the content of the button on the same page?

If some button is there with some text as valur and I want onclick it prints the text on the same page

24th Nov 2019, 1:57 PM
Tanmay Gupta
Tanmay Gupta - avatar
3 Answers
+ 2
I have make it check out and tell it is that you want https://code.sololearn.com/WTfBziWWQig6/?ref=app
25th Nov 2019, 1:41 AM
Master Genius [ INACTIVE ]
Master Genius [ INACTIVE ] - avatar
+ 2
Ok I got it before only But thanks
30th Nov 2019, 11:31 AM
Tanmay Gupta
Tanmay Gupta - avatar
+ 1
Tanmay ! I have created a button using input type = submit And give its value hello world With the JavaScript value of the word using .value command Then I said the value of end with the help of JavaScript in innerHTML property
28th Nov 2019, 10:05 AM
Master Genius [ INACTIVE ]
Master Genius [ INACTIVE ] - avatar