exam questions

Exam 98-382 All Questions

View all questions & answers for the 98-382 exam

Exam 98-382 topic 1 question 3 discussion

Actual exam question from Microsoft's 98-382
Question #: 3
Topic #: 1
[All 98-382 Questions]

You are designing a web page with a script that must dynamically change the content of a paragraph element to display the value returned by the function
.
randomQuote()
You have created the following code. Line numbers are included for reference only.

Which code segment should you use at line 08?

  • A. document.getElementById("tester").value = randomQuote();
  • B. document.getElementById("tester").title = randomQuote();
  • C. document.getElementById("tester").innerHTML = randomQuote();
  • D. document.getElementById("tester").script = randomQuote();
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
References:
https://www.w3schools.com/html/html_scripts.asp

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
computercat
3 years, 8 months ago
document.getElementById("tester").innerHTML = randomQuote(); Because it's a paragraph, they update using .innerHTML and not .value, .script or .title
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...