Important Notice:

Course Content
Switch Statement
0/1
break and continue Statements
0/3
Basic Form Validation in JavaScript
0/1
JavaScript & Angular JS (Chapter- 6) M2-R5.1
About Lesson

Confirm Box:-

               confirm dialog box,  user से किसी task के बारे में confirmation लेने के लिए प्रयोग किया जाता है ये एक छोटी सी window होती है इस Dialog Box में हमें “OK” व “Cancel” नाम के दो Buttons प्राप्त होते हैं। ये Dialog Box true या false में से किसी एक Value को भी Return करता है। यानी यदि हम इस Dialog Box के OK Button पर Click करते हैं, तो ये Dialog Box true Value Return करता है, जबकि Cancel Button पर Click करने पर ये Dialog Box false Value Return करता है।    

Syntax:- Boolean confirm(<string>)

Note:- Boolean is the data type of the value that this method returns. <string> is the message which will appear in the dialog box.

      Example:-     ch=confirm(“press any button”)

 

Confirm Box:-

                Confirm dialog box is used to take confirmation from the user about a task. It is a small window. In this dialog box, we get two buttons named “OK” and “Cancel”. This Dialog Box also returns either true or false value. That is, if we click on the OK Button of this Dialog Box, then this Dialog Box returns true Value, whereas if we click on Cancel Button, this Dialog Box returns false Value.

Syntax:-          Boolean confirm(<string>)

Note:- Boolean is the data type of the value that this method returns. <string> is the message which will appear in the dialog box.

     Example:-   ch=confirm(“press any button”)

 

error: Content is protected !!