title: How to focus a <tr> or <td> tag using jQuery or JavaScript?
body: <pre><code>for(var i=0;i&lt;tr.length;i++){
      var td = tr[i].getElementsByTagName("td");
      if(td[2].innerHTML==time &amp;&amp; td[3].innerHTML==cls){
          td[0].setAttribute("id","focus");
          tr[i].style.backgroundColor="green";
          var foc = document.getElementById("focus");
          foc.focus();
          cnt++;
      }
      else{
          tr[i].style.backgroundColor="transparent";
      }
  
   }
  </code></pre>