Update 'index.html'

This commit is contained in:
nodemixaholic 2024-03-31 21:54:55 +00:00
parent dfe4324ccd
commit d3165a202b

View file

@ -1,18 +1,26 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>FrontendJS Example</title> <title>FrontendJS Example</title>
</head> </head>
<body>
<script src="frontend.js"></script> <script src="frontend.js"></script>
<script> <script>
initBody()
clearPage() clearPage()
let firstH1 = createElement("h1", "h1-1") writeHTML("body", markdownToHTML(`# Hello world!
writeText("h1-1", "Hello, world")
createParagraph("paragraph1", `This is an example of how to properly use Frontend JS. This is an example of how to properly use Frontend JS.
Also it's a test if things are working.`) Also it's a test if things are working.
* Air
* Water
* Fire
* Dirt
* ####ing magnets, how do they work!?!
`))
createParagraph("paragraphLorum", `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pulvinar nisl eu risus tincidunt, non aliquet metus tempor. Duis ac tortor commodo, venenatis leo at, consectetur nulla.`)
let dino = createButton("dino", "dino sound") let dino = createButton("dino", "dino sound")
changeAttributes(dino, {"onclick": "playAudio(`https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3`, 0.4)"}) changeAttributes(dino, {"onclick": "playAudio(`https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3`, 0.4)"})
</script> </script>
</body>
</html> </html>