Which declaration should you use?

You create a Web page that contains the following code. (Line numbers are included for reference
only.)

You need to ensure that when the user clicks an item in the list, the text color of the “Welcome!”
message will change. Which declaration should you use?

You create a Web page that contains the following code. (Line numbers are included for reference
only.)

You need to ensure that when the user clicks an item in the list, the text color of the “Welcome!”
message will change. Which declaration should you use?

A.
<ul id=”color”>
<li onclick=”changeColor(this.innerText);”>Black</li>
<li onclick=”changeColor(this.innerText);”>Red</li>
</ul>

B.
<ul id=”color”>
<li onclick=”changeColor(this.style.color);”>Black</li>
<li onclick=”changeColor(this.style.color);”>Red</li>
</ul>

C.
<ul id=”color”>
<li><a
onfocus=”changeColor(this.innerText);”>Red</a></li>

<li><a
onfocus=”changeColor(this.innerText);”>Black</a></li>
</ul>
</ul>

D.
<ul id=”color”>
<li onclick=”changeColor(this.style.color);”>Black</li>
<li onclick=”changeColor(this.style.color);”>Red</li>
</ul>

E.
<ul id=”color”>
<li><a
onfocus=”changeColor(this.innerText);”>Red</a></li>
<li><a
onfocus=”changeColor(this.innerText);”>Black</a></li>
</ul>

F.
<ul id=”color”>

Explanation:
https://www.logicsmeet.com/dumps/Download/Microsoft/Microsoft.70-515.logicsmeet.4-5-
2012.pdf
http://www.scribd.com/doc/54384588/98/Question-107
http://www.netsqlinterviewquestions.com/questions/89_Practice_Exam_70-515TS-WebApplications-Development-with-Microsoft-NET-Framework-4-Paper- 2.aspx?qID=6527&PaperID=89



Leave a Reply 0

Your email address will not be published. Required fields are marked *