Answer the question
In order to leave comments, you need to log in
AppendChild doesn't want to work, what's wrong?
The code does not work, it gives: Uncaught TypeError: fieldchat.appenChild is not a function I've been breaking
my head for
2 hours, please help
HTML:
<ul class="chat" id="field-chat">
<li class="left clearfix">Element #1</li>
</ul>
var fieldchat = document.getElementById("field-chat");
var li = document.createElement("li");
li.innerHTML = "Element #2";
fieldchat.appenChild(li);
Answer the question
In order to leave comments, you need to log in
Carefully read the text of the error and your code :) The word append lacks the letter d.
https://codepen.io/hogart/pen/bRgrNd
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question