nerdexam
Microsoft

98-375 · Question #61

Which two HTML properties can JavaScript access to change the text value of an HTML element? (Choose two.)

The correct answer is A. innerHTML C. title. A: The innerHTML property sets or returns the inner HTML of an element. document.getElementById('myAnchor').innerHTML="Contoso"; C: The title property sets or returns the element's advisory title. var x=document.getElementsByTagName('body')[0];document.write("Body title: " +…

Understanding JavaScript

Question

Which two HTML properties can JavaScript access to change the text value of an HTML element? (Choose two.)

Options

  • AinnerHTML
  • BnodeType
  • Ctitle
  • DnodeValue

How the community answered

(28 responses)
  • A
    79% (22)
  • B
    14% (4)
  • D
    7% (2)

Explanation

A: The innerHTML property sets or returns the inner HTML of an element. document.getElementById('myAnchor').innerHTML="Contoso"; C: The title property sets or returns the element's advisory title. var x=document.getElementsByTagName('body')[0];document.write("Body title: " + x.title);

Topics

#DOM manipulation#innerHTML#nodeValue#HTML properties

Community Discussion

No community discussion yet for this question.

Full 98-375 Practice