conceptos
JavaScript HTML DOM - Changing HTML ❮ Previous Next ❯ The HTML DOM allows JavaScript to change the content of HTML elements. Changing the HTML Output Stream JavaScript can create dynamic HTML content: Date: Mon Feb 27 2017 21:49:37 GMT-0500 (Hora est. Pacífico, Sudamérica) In JavaScript, document.write() can be used to write directly to the HTML output stream: Example < !DOCTYPE html > < html > < body > < script > document. write (Date()); < /script > < /body > < /html > Try it Yourself » Never use document.write() after the document is loaded. It will overwrite the document. Changing HTML Content The easiest way to modify the content of an HTML element is by using the innerHTML property. To change the content of an HTML element, use this syntax: document.getElementById( id ).innerHTML = new HTML This example changes the content of a <p> element: Example < htm...