Skip to content

displayNewMessage

cl4cnam edited this page Nov 17, 2023 · 5 revisions

Syntax

displayNewMessage(message)

Parameters

  • message: string
    What you want to be displayed

Return value

  • The newly created <p> HTML element

Side effect

  • Create a new <p>message</p> HTML element inside the <body> element (at the end).
    • This new element has two CSS classes: display and other
    • This new element is scrolled into the visible part of screen
    • If lib.css is loaded, you get this default style: border-color: #00c000; background-color: #c0ffc0; margin-left: 10px; margin-right: auto; border-style: solid; border-width: 1px; border-radius: 10px; padding: 15px; width: 45%;