Question 166Asked in DSSSB TGT Computer Science, 25 Jun 2023, Shift 3 (4:30 PM)

While working on a JavaScript project, in your JavaScript application, which function would you use to send messages to users requesting for text input?

  1. ADisplay()
  2. BAlert()
  3. CPrompt()
  4. DGet input()
Show answerHide answer

Correct answer: (C) Prompt()

Explanation

prompt() shows a dialog box with a text field and returns what the user types. alert() only displays a message.

From DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 3 (4:30 PM)

This is question 166 of DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 3 (4:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.