WebProgramming Academy

Chapter Two: Display Outputs

In this chapter we will discuss about displaying an output to the user. This is useful if the user is planning to display information to the user when they enter your website.

Window.alert

The window alert displays an out put to the user. This can display a calculation or a text to the user as soon as they enter the website. This is useful to display a warning to the user or giving some information to the user before they enter your website.

Document.write

The document write displays output into the HTML document. This will display anything you want to be displayed but it will only display into the HTML document. It will not be like window.alert display.

innerHTML

The innerHTML targets the HTML element tag to display a text or a calculation. This is useful if you want to display something into the HTML document at a specfic spot.