• 实现表格的变色


    表格展示

    1234 435 76867 789789
    1234 435 76867 789789
    1234 435 76867 789789
    1234 435 76867 789789
     1 <html>
     2  <head>
     3  <title>表格展示</title>
     4  <script language="JavaScript">
     5      /*
     6      *by:rush date:2011年1月9日 00:07:52
     7      *功能:实现表格的变色
     8      */
     9      function responseMouseEvent(obj,type){
    10          if(type==1){
    11              obj.style.backgroundColor = "#6699CC"
    12          }
    13          else if(type==2){
    14              obj.style.backgroundColor = "#FFFFFF"
    15          } 
    16      }
    17      function responseClickEvent(obj){
    18          if(obj.children[0].children[0].checked==true){ 
    19              obj.children[0].children[0].checked = false;
    20              obj.style.backgroundColor = "#FFFFFF" 
    21              obj.onmouseover = function(){responseMouseEvent(obj,1);};
    22              obj.onmouseout = function(){responseMouseEvent(obj,2);};
    23          }
    24          else{
    25              obj.children[0].children[0].checked = true;
    26              obj.style.backgroundColor = "#DFD027"// 
    27              obj.onmouseover = null;
    28              obj.onmouseout = null;
    29          }
    30      }
    31  </script>
    32  </head>
    33  <body>
    34      <table>
    35          <tr onclick="responseClickEvent(this);" onmouseover="responseMouseEvent(this,1);" onmouseout="responseMouseEvent(this,2)" style="cursor:hand;background-color:#FFFFFF" >
    36              <td>
    37                  <input type="checkbox" name="update_checkbox" id="update_checkbox" />
    38              </td>
    39              <td>1234</td>
    40              <td>435</td>
    41              <td>76867</td>
    42              <td>789789</td>
    43          </tr>
    44          <tr onclick="responseClickEvent(this);" onmouseover="responseMouseEvent(this,1);" onmouseout="responseMouseEvent(this,2)" style="cursor:hand;background-color:#FFFFFF" >
    45              <td><input type="checkbox" name="update_checkbox" id="update_checkbox" />
    46              <td>1234</td>
    47              <td>435</td>
    48              <td>76867</td>
    49              <td>789789</td>
    50          </tr>
    51          <tr onclick="responseClickEvent(this);" onmouseover="responseMouseEvent(this,1);" onmouseout="responseMouseEvent(this,2)" style="cursor:hand;background-color:#FFFFFF" >
    52              <td><input type="checkbox" name="update_checkbox" id="update_checkbox" />
    53              <td>1234</td>
    54              <td>435</td>
    55              <td>76867</td>
    56              <td>789789</td>
    57          </tr>
    58          <tr onclick="responseClickEvent(this);" onmouseover="responseMouseEvent(this,1);" onmouseout="responseMouseEvent(this,2)" style="cursor:hand;background-color:#FFFFFF" >
    59              <td><input type="checkbox" name="update_checkbox" id="update_checkbox" />
    60              <td>1234</td>
    61              <td>435</td>
    62              <td>76867</td>
    63              <td>789789</td>
    64          </tr>
    65      </table>
    66  </body>
    67  </html>
  • 相关阅读:
    springCloud你要了解的都在这(方向性)
    十分钟了解 spring cloud
    JDK 自带压缩解压流
    JAVA自带API的压缩与解压
    Java实现多文件压缩打包的方法
    芯片超Intel,盈利比肩Apple,三星成科技界"全民公敌"
    一个不知道体谅难处,一个说话伤人自尊,矛盾的种子已悄悄埋下
    一天杀了两千宦官(袁绍也曾仗义过,为东汉彻底除去了宦官祸害。何进却心软了,任凭袁绍怎么劝说,何进就是不下手)
    WMWaire使用FreeNAS硬盘挂载、Raid0
    net share列出了Windows的默认共享(包括C盘)
  • 原文地址:https://www.cnblogs.com/yony/p/2855753.html
Copyright © 2020-2023  润新知