JS - append element

0 votes
153 views
added Jul 3, 2019 in Javascript by LC Marshal Captain (25,790 points)
function appendElement() {
  var para = document.createElement("P");
  var sentenc = document.createTextNode("My first line");
  paraG.appendChild(sentenc);
  document.body.appendChild(para);
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...