+ 1
Code Problem
Why this sh** (code) isn't working? https://code.sololearn.com/WgO04U42CF1W/?ref=app
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
+ 1
Thanks!
0
It's working
0
Hii