World Lists: Difference between revisions

From ProgZoo
Jump to navigation Jump to search
Created page with "<pre id='shellbody' data-qtp='DOM'></pre> ==Create Content== <div class='qu'> You can create a div element an set the content. We use the document method '''createElement'''..."
 
(No difference)

Latest revision as of 14:02, 16 January 2022


Create Content

You can create a div element an set the content.

We use the document method createElement and the DOM node method append

Change the code so that it says 'Hello world'
let e = document.createElement('div');
e.innerHTML = 'Hello';
document.body.append(e);
let e = document.createElement('div');
e.innerHTML = 'Hello world';
document.body.append(e);
Served by: dill at 2025-09-12T15:18

Navigation menu