title: change a tag background color by ID
body: <p>HTML is like this:</p>
  
  <pre><code>     &lt;div class="header"&gt;
  &lt;ul&gt;
    &lt;li&gt;
       &lt;a class="abc" id="abc" href="www.testing.com"&gt;testing&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My javascript is like this:</p>
  
  <pre><code>    &lt;script language="javascript" type="text/javascript"&gt;
  var links = document.getElementById("abc");
  var a = links.getElementsByTagName("a");
  var thisLocationHref = window.location.href;
  for(var i=0;i&lt;a.length;i++)
  {
  
    var tempLink = a[i];      
  
    if(thisLocationHref === tempLink.href)
    {
        tempLink.style.backgroundColor="red";
    }
    else
    {
        tempLink.style.backgroundColor="blue";
    }
  }
  </code></pre>
  
  <p>
   I cannot remove ID in the a tag because it relates another page.
  I know there is something wrong in the code, but cannot figure out where.
  Any help is welcome!
  Thanks!</p>