Which method returns a value in the form of a text string?

Prepare for the uCertify CIW Advanced HTML5 and CSS3 Specialist Exam. Dive into essential topics with flashcards and multiple-choice questions. Enhance your understanding with hints and explanations for each question. Pass your exam confidently!

Multiple Choice

Which method returns a value in the form of a text string?

When collecting simple text input from a user in a browser, you use a dialog that returns the typed text as a string. The prompt dialog presents a message and a text field, and it returns what the user typed as a string (or null if the user cancels). The alert dialog just shows a message and doesn’t return any user input. The confirm dialog asks a yes/no question and returns a boolean. A non-standard function like promptInput isn’t part of the built-in API for getting text input. Therefore, the method that returns a text string is prompt.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy