Рет қаралды 15,642
Hello Doston,
In this video we will learn to use different popup boxes. In javascript we have total three popup boxes i.e. Alert Box, Confirm Box and Prompt Box.
Alert Box
1. An alert box is often used if you want to make sure information comes through to the user.
2. When an alert box pops up, the user will have to click "OK" to proceed.
Confirm box
1. A confirm box is often used if you want the user to verify or accept something.
2. When a confirm box pops up, the user will have to click either "OK" or "Cancel" to proceed.
3. If the user clicks "OK", the box returns true. If the user clicks "Cancel", the box returns false.
Prompt box
1. A prompt box is often used if you want the user to input a value before entering a page.
2. When a prompt box pops up, the user will have to click either "OK" or "Cancel" to proceed after entering an input value.
3. If the user clicks "OK“, the box returns the input value. If the user clicks "Cancel“, the box returns null.