JavaScript can easily let you generate an alert box. You do this by calling the alert method. In programming terminology, a method is a function that acts on a specific object. A function is a piece of code that performs a specific task. Notice the parentheses, which provide a place to put function arguments.
Arguments are additional, variable pieces of information that the function does something with.
In this case, we'll pass as an argument the message to display in the alert box. JavaScript requires parentheses after method names, even if the parentheses are empty. Once again, we'll enter a JavaScript command as an event handler. In this case, the event is onSubmit, which is generated when the user clicks on the Submit button on a form. The argument is enclosed in single quotes again, since the entire expression is in double-quotes.