Skip to main content

Home/ Scripters/ Group items tagged right

Rss Feed Group items tagged

Jac Londe

What is the correct way to write HTML using Javascript? - Stack Overflow - 0 views

  • document.write() will only work while the page is being originally parsed and the DOM is being created. Once the browser gets to the closing </body> tag and the DOM is ready, you can't use document.write() anymore.
  • Using innerHTML on a node:
  • var node = document.getElementById('node-id'); node.innerHTML('<p>some dynamic html</p>');
1 - 2 of 2
Showing 20 items per page