asp.net.ph

Skip Navigation Links

alert Method

DHTML Methods


Displays a dialog box containing an application-defined message.

Syntax

window.alert (  [ sMessage ] ) 
Parameters

sMessage Optional. String to display in the Alert dialog box. If no value is provided, the dialog box will have no message.

Return Value

No return value.

Remarks

The title bar of the Alert dialog box cannot be changed.

Example

The following script will display a simple Alert dialog box.

alert ( "Welcome to the Workshop" );

 Show me 

Applies To

window

See Also

confirm, prompt



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note