0

help me in my code. i want to display the value of 2 inputs and the textarea.

https://code.sololearn.com/W61kLnT34xb8/#html

13th Sep 2018, 2:51 AM
Wilfred Florendo
Wilfred Florendo - avatar
4 Réponses
+ 3
2 errors and 1 warning found: Syntax error: getElementbyId, it's getElementById. Element member error: div element cannot update with value attribute, it should be innerHTML or innerText. Warning: script tag should be in the head tag or before the closing tag of body. Correction: function post() { var a = document.getElementById("nameee").value; var b = document.getElementById("dateee").value; var c = document.getElementById("comment").value; document.getElementById("posthere").innerHTML = a + b + c; }
13th Sep 2018, 3:18 AM
Calviղ
Calviղ - avatar
+ 2
function post() { var a = document.getElementById("nameee").value; var b = document.getElementById("dateee").value; var c = document.getElementById("comment").value; document.getElementById("posthere").innerHTML = "<p>" + a + "</p>" + "<p>" + b + "</p>" + "<p>" + c + "</p>"; }
13th Sep 2018, 3:47 AM
Calviղ
Calviղ - avatar
+ 1
Thank you so much @Calvin. You`re a big help :)
13th Sep 2018, 3:53 AM
Wilfred Florendo
Wilfred Florendo - avatar
0
how can i make the output looks like this Wilfred Florendo 09-13-18 This is a comment
13th Sep 2018, 3:38 AM
Wilfred Florendo
Wilfred Florendo - avatar