title: Change class attribute of td by onmouseover
body: <p>I'm constructing a table. And I need a <code>&lt;td&gt;</code> of table change it's attribute <code>class</code> to <code>someattribute</code> till mouse over.</p>
  
  <p>How should it be?</p>
  
  <p>Code:</p>
  
  <pre><code>var table = document.createElement('table');
  for (var i = 1; i &lt;=10; i++)
  {
      var tr = document.createElement('tr');
      tr.setAttribute('id',i)
      table.appendChild(tr);
      for (var j = 1; j &lt;=15; j++)
      {
          var td = document.createElement('td');
          td.setAttribute('id',j);
          // Here:
          td.OnMouseOver = new function() 
          {
              td.setAttribute("class","new");
          };
          tr.appendChild(td);
      };
  };
  
  document.getElementById("grid").innerHTML = '';
  document.getElementById("grid").appendChild(table);
  </code></pre>