Which of the following methods in Java Script will display a window having a dialog box with a specified message, along with an OK and CANCEL button as options?
Show answerHide answer
Correct answer: (C) confirm ()
Explanation
confirm() shows a dialog with a message and OK and Cancel buttons and returns true or false. alert() has only OK, and prompt() also asks for text input.