nerdexam
Microsoft

98-375 · Question #27

You add script tags to an HTML page. You need to update the text value within a specific HTML element. You access the HTML element by id. What should you do next?

The correct answer is D. Use the firstChild property and set the new text value with the nodeValue property. See the full explanation below for the reasoning.

Question

You add script tags to an HTML page. You need to update the text value within a specific HTML element. You access the HTML element by id. What should you do next?

Options

  • AUse the createTextNode method.
  • BUse the appendChild method.
  • CSet the new text value with the setAttribute method.
  • DUse the firstChild property and set the new text value with the nodeValue property.

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    17% (4)
  • D
    71% (17)

Community Discussion

No community discussion yet for this question.

Full 98-375 Practice