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: " +…
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)- A79% (22)
- B14% (4)
- D7% (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
Community Discussion
No community discussion yet for this question.