Visual theme:

1. Simple message

Opens a message with just a text. All other values are set by default.
JSDialog.showMessageDialog("Test message!");

2. Warning multiline message

Opens a warning message dialog with two lines text.
JSDialog.showMessageDialog(
	"Warning multiline long long long long long \nmessage!",
	"warning"
);

3. Error multiline message

Opens a error message box with long text inside it.
JSDialog.showMessageDialog(
	"Your web app require JSDialog to show these dialogs.\n" +
	  "It has a number of skins and is really advanced tool\n" +
	  "for showing text messages, confirmation dialogs\n" +
	  "and custom dialogs.",
	"error",
	null,
	520,
	105
);

4. Info message without an icon

Message dialog without an icon inside, custom title and custom button text.
JSDialog.showMessageDialog(
	"Info message without an icon",
	"none",
	null,
	350,
	40,
	"Custom title",
	"Got it!"
);

5. Custom icon dialog

In this message dialog we use custom icon by providing its URL instead setting the type of the dialog.
JSDialog.showMessageDialog(
	"JS+ Dialog is the best",
	"http://js.plus/img/icons64/jsplus.png"
);

6. "OK" button press handling

Show a dialog and show another dialog after the first one is closed.
JSDialog.showMessageDialog(
	"Press OK and see the new dialog",
	"confirm",
	function() {
		JSDialog.showMessageDialog("OK pressed!");
	}
);

7. Multiple event handling

Three messages with different types inside each other. See another way to pass the functions inside JSDialog.showMessageDialog method.
var errorOnClose = function() {
	JSDialog.showMessageDialog(
		"See our help instructions to fix the problems."
	);
};
var warningOnClose = function() {
	JSDialog.showMessageDialog(
		"Unable to close all applications.\nPlease check their progress manually.",
		"error",
		errorOnClose
	);
};
JSDialog.showMessageDialog(
	"The system will shutdown in 3..2..1..now!",
	"warning",
	warningOnClose
);