English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

What is the uses of prompt dialog box? - Computer Applications

Advertisements
Advertisements

Question

What is the uses of prompt dialog box?

Short Note

Solution

The prompt dialog box is very useful when the user want to pop-up a text box to get user input. Thus, it enables you to interact with the user. The user needs to fill in the text box field and then click OK.

The Syntax of prompt dialog box is:

Prompt(“Message”,”defaultValue”);
(or)
window.prompt(”sometext”,”defaultText”);

Example:

prompt(“Enter Your Name:”,”Name”);
(or)
window.prompt(“Enter Your Name:”,”Name”);
shaalaa.com
Javascript Popup or Dialog Boxes
  Is there an error in this question or solution?
Chapter 14: Introduction to Javascript - Evaluation [Page 314]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 11 TN Board
Chapter 14 Introduction to Javascript
Evaluation | Q 9. | Page 314
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×