home ~ projects ~ socials

Inline Scripts

Scripts can also be added to a page directly from the content. The content is wrapped in HTML script tags and added to the head of the document.

-- p
-- id: theTime

Loading Time...

-- javascript

document.addEventListener("DOMContentLoaded", () => {
  theTime.innerHTML = new Date()
})

Output

Loading Time...

-- end of line --