Popup
Popups are an additional way to show information, take user confirmation, or take user input from additional documents. A popup can navigate to a new URL and send information to the opener window. Alert box, Confirmation box, and Prompt box are the global functions where we can show the popup information.
alert(): It displays information to the user and has an "OK" button to proceed.
confirm(): Use as a dialog box to confirm or accept something. It has "Ok" and "Cancel" to proceed. If the user clicks "Ok" then it returns
true
, if click "Cancel" it returnsfalse
.prompt(): Takes user input value with "Ok" and "Cancel" buttons. It returns
null
if the user does not provide any input value.
Last updated
Was this helpful?