JavaScript Reference/Javascript Methods/alert

Материал из Web эксперт
Перейти к: навигация, поиск

"alert()" Example

   <source lang="javascript">
   

<html> <body> <input type="button" onClick="alert("This is an alert window");" value="Click me"> </body> </html>


     </source>
   
  


"alert()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |window | +----------------+--------------------------------------------------------------+

     </source>
   
  


"alert()" Syntax, Parameters and Note

   <source lang="javascript">

Note: An alert message in a dialog window.

Syntax:

window.alert(param1)

Parameters:

   param1   Optional; the message.
   
     
     </source>