title: How do that li tags changed their colors when I click my mouse on body field?
body: <p>I want to click on the different fields on my website (in field body) and <code>&lt;li&gt;</code> tags should changed their colors. (random colors). How to do it?</p>
  
  <pre><code>&lt;body onclick="highlight()"&gt;
  
  &lt;ul list style type = "none"&gt;
    &lt;li id = "l0"&gt;this is line one&lt;/li&gt;
    &lt;li id = "l1"&gt;this is line two&lt;/li&gt;
    &lt;li id = "l2"&gt;this is line three&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;script&gt;
  function highlight(name,color) {
    var a = document.getElementById(name);
    a.style.color = color;
  }
  
  highlight("l0", "red");
  highlight("l2", "blue");
  
  &lt;/script&gt;
  
  &lt;/body&gt;
  </code></pre>