Which window method generates a dialog box that displays whatever text you…
2018
Which window method generates a dialog box that displays whatever text you pass as a parameter in JavaScript?
Answer: C. Alert() — The alert method displays a dialog box with a specified message and an OK button. Options like display, show, or perform are not valid JavaScript window…
- A.
Display()
- B.
Show()
- C.
Alert()
- D.
Perform()
Attempted by 437 students.
Show answer & explanation
Correct answer: C
The alert method displays a dialog box with a specified message and an OK button. Options like display, show, or perform are not valid JavaScript window methods for generating standard dialog boxes. Therefore, alert is the correct function to use when passing text as a parameter for user notification.
Loading lesson…