Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js add multiple element to document

function AppendElements(htmlStringList)
{
  for (let i = 0;i < htmlStringList.length;++i)
  {
    var div = document.createElement('div');
    div.innerHTML = htmlString.trim();

    document.body.appendChild(div);
  }
}
 
PREVIOUS NEXT
Tagged: #js #add #multiple #element #document
ADD COMMENT
Topic
Name
1+6 =