zoukankan      html  css  js  c++  java
  • Java web ch02_12_ColorTable

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>变色表格示例</title>
    <script language="javascript">
    function changeColor(row){
    document.getElementById(row).style.backgroundColor='#CCCCFF';
    }
    function resetColor(row){
    document.getElementById(row).style.backgroundColor=";
    }</script>
    </head>
    <body>
    <table width="200" border="1" cellspacing="1" cellpadding="1" align="center">
    <tr><th>学校</th><th>专业</th><th>人数</th></tr>
    <tr align="center" id="row1"
    onMouseOver="changeColor('row1')" onMouseOut="resetColor('row1')">
    <th>北大</th><th>法律</th><th>2000</th>
    </tr>
    <tr align="center" id="row2"
    onMouseOver="changeColor('row2')" onMouseOut="resetColor('row2')">
    <th>清华</th><th>计算机</th><th>5000</th>
    </tr>
    <tr align="center" id="row3"
    onMouseOver="changeColor('row3')" onMouseOut="resetColor('row3')">
    <th>人大</th><th>经济</th><th>6000</th>
    </tr>
    </table>
    </body>
    </html>

  • 相关阅读:
    input type="number"
    Creating Directives that Communicate
    angular Creating a Directive that Adds Event Listeners
    angular 自定义指令 link
    cookie
    angular filter
    angular 倒计时
    angular $watch
    angular 自定义指令
    angular 依赖注入
  • 原文地址:https://www.cnblogs.com/meng2/p/7689642.html
Copyright © 2011-2022 走看看