News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
01<script>
02function changeColor(c) {
03message.style.color=c;
04}
05</script>
07<p id="message">Welcome!</p>
08<ul id="color">
09<li>Black</li>
10<li>Red</li>
11</ul>

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?

  1. <ul id="color">
    <li onclick="changeColor(this.innerText);">Black</li>
    <li onclick="changeColor(this.innerText);">Red</li>
    </ul>
  2. <ul id="color">
    <li onclick="changeColor(this.style.color);">Black</li>
    <li onclick="changeColor(this.style.color);">Red</li>
    </ul>
    
  3. <ul id="color">
    <li><a onfocus="changeColor(this.innerText);">Red</a></li> <li><a onfocus="changeColor(this.innerText);">Black</a></li>
    </ul> </ul>
  4. <ul id="color">
    <li onclick="changeColor(this.style.color);">Black</li>
    <li onclick="changeColor(this.style.color);">Red</li>
    </ul>
  5. <ul id="color">
    <li><a
    onfocus="changeColor(this.innerText);">Red</a></li>
    <li><a
    onfocus="changeColor(this.innerText);">Black</a></li>
    </ul>

Answer: Answer is a
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;