欢迎来到易学考试网 易学考试官网
全部科目 > 微软认证考试 > MCTS > MCTS(70-515)

单项选择题

You create a Web page that contains the following code.

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> 
    D.<ul id="color"> <li><a onfocus="changeColor(this.innerText);">Red</a></li> <li><a onfocus="changeColor(this.innerText);">Black</a></li> </ul>

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题