JavaScript » Window » alert

Syntax:
window.alert("message")

This method displays an alert box containing a message and an o.k. button.

Use this method to convey a message that does not require a decision from the user.

Examples

Code:
window.alert("Welcome to DevGuru.com")
Code:
window.alert("Welcome to\nDevGuru.com")
Explanation:

If you wish to have the text appear on more than one line, you use the \n as a line break.