133k views
21 votes
Code for the alert box is

(a) alert("Some text");(b) tab.alert("sometext");(c) html.alert("sometext");(d) None of the above

User Fravolt
by
4.1k points

1 Answer

3 votes

Answer:

(a) alert("Some text");

Step-by-step explanation:

When coding in Javascript the correct code for creating an alert box is

alert("Some text");

This will generate an alert box at the top center of the user's screen that has the text which you have written inside the quotation marks. This is the simplified version of the original code which is also what is more commonly used. The original code would be

window.alert("Some text");

User Khn Rzk
by
4.1k points