PrepAway - Latest Free Exam Questions & Answers

What is the expected output when you run this script in a browser?

Consider the following code:

What is the expected output when you run this script in a browser?

PrepAway - Latest Free Exam Questions & Answers

A.
A button labeled Click Me will appear, with an input box that displays the following default text:
Old Value. Upon clicking the button, the textin the text box will change to New Value. Upon
clicking the button again, the text in the text box will change back to Old Value.

B.
A button labeled Click Me will appear, with an input box that displays the following default text:
Old Value. Upon clicking the button, the text inthe text box will change to New Value. Upon
clicking the button again, the text in the text box will change to Old Value, New Value.

C.
A button labeled Click Me will appear, with an input box that displays the following default text:
Old Value. Upon clicking the button, the text inthe text box will change to New Value. Upon
clicking the button again, you will see nothing change.

D.
This script will not run. You will get an error because the value=”Old Value” statement in the
<input> tag contains the reserved wordValue within the quotes.

Explanation:

PrepAway - Latest Free Exam Questions & Answers

Leave a Reply