随笔-200  评论-148  文章-15  trackbacks-0
<html>
 
  <head>
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">
  <style>
  .EvenOrOddRow{
  background-color:   expression((this.sectionRowIndex%2)?'white':'#E0E0E0');
  }
 
  </style>
  <script>
  var   currentActiveRow;
  function   changeActiveRow(obj)
  {
  if(currentActiveRow)   currentActiveRow.style.backgroundColor="";
  currentActiveRow=obj;
  currentActiveRow.style.backgroundColor="Red";
  alert(currentActiveRow.cells[0].innerHTML);
  alert(currentActiveRow.cells[1].innerHTML);
  }
 
  </script>
  </head>
  <body>
  <table   width=100%>
  <tr   bgcolor=aaaaaa   >
  <td>Code</td><td>Name</td>
  </tr>
  <tr   class="EvenOrOddRow"   onclick="changeActiveRow(this);">
  <td>001</td><td>zhangsan</td>
  </tr>
  <tr   class="EvenOrOddRow"   onclick="changeActiveRow(this);">
  <td>001</td><td>zhangsan</td>
  </tr>
  <tr   class="EvenOrOddRow"   onclick="changeActiveRow(this);">
  <td>001</td><td>zhangsan</td>
  </tr>
  <tr   class="EvenOrOddRow"   onclick="changeActiveRow(this);">
  <td>001</td><td>zhangsan</td>
  </tr>
 
  </body>
  </html>
posted on 2008-01-13 10:27 无声 阅读(1295) 评论(0)  编辑  收藏 所属分类: 职场生活

只有注册用户登录后才能发表评论。


网站导航: