Displaying name | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Displaying name

I want to know how to do this (JavaScript) : 1. I ask what is the name of the user. (Can I know your name?) 2. It is displayed in an alert box. (Hi (name) nice to meet you) 3. The user clicks ok 4.In the screen, the name is displayed again (Hello, (name) This is my website. If you like it please give me an upvote *********************** Others ********************) (If you can give me an example, please share it on this post)

23rd Jul 2017, 11:49 AM
Code Master
Code Master - avatar
3 Answers
+ 14
Tip: Make more controls on the input. https://code.sololearn.com/W2AhMmxyXbnK/?ref=app
23rd Jul 2017, 12:02 PM
Maz
Maz - avatar
0
You should learn the course here of JS. At some point it's shown how to do such things, for instance with document.createTextNode() and more
24th Jul 2017, 1:48 PM
Tzahi Leh
Tzahi Leh - avatar
0
@Maz I've try it on my code but can you put it on the second paragraph?
25th Jul 2017, 12:03 PM
Code Master
Code Master - avatar