218k views
1 vote
You have created a new Web site for your company, and you want to add a script so that a "welcome" pop-up box appears to the user as soon as he or she launches the site. Which JavaScript method should you use to display the message?

User Robmisio
by
6.1k points

1 Answer

3 votes

Answer:

The correct answer to the following question is The alert() method.

Step-by-step explanation:

The alert() function is the function of the javascript which is applied on the web page to alert the users for something important who is surfing on that web page.

If the javascript alert box is on the button in the HTML page then, when the user clicks on that button the alert box will pop-up on the screen with the alert message which you written inside the alert() parentheses.

Syntax:

alert("Hello sir");

User Cpater
by
6.7k points