+ 1

Code Problem

Why this sh** (code) isn't working? https://code.sololearn.com/WgO04U42CF1W/?ref=app

16th Feb 2019, 12:07 PM
Roman Pervutinskiy
Roman Pervutinskiy - avatar
4 Respuestas
+ 6
There's a function named `write` that binds to the document object, for this reason you'll have to assign a different name for your function. e.g. name it `writeName`. Also in the function definition you should refer to the text input and paragraph within the function's body, as follows: function writeName() { var inp = document.getElementById("inp"); var par = document.getElementById("par"); par.innerHTML = "Welcome, " + inp.value + "!"; } Hth, cmiiw
16th Feb 2019, 2:10 PM
Ipang
+ 1
Thanks!
16th Feb 2019, 2:27 PM
Roman Pervutinskiy
Roman Pervutinskiy - avatar
0
It's working
17th Feb 2019, 4:26 AM
Dinesh Dilip Waditke
Dinesh Dilip Waditke - avatar
0
Hii
18th Feb 2019, 6:13 AM
Shawon