鼠标经过切换对应显示内容

<!DOCTYPE html>
  <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>鼠标悬浮切换显示</title>
      <!-- js方法 -->
      <script type="application/javascript">
        function ChangeDiv(divId,divName,zDivCount){
          for(i=0;i<=zDivCount;i++){
            document.getElementById(divName+i).style.display="none";
          }
          document.getElementById(divName+divId).style.display="block";
        }
      </script>
    </head>
    <body>
      <table border=0 cellSpacing=0 cellPadding=0 width="100%">
        <tbody>
          <tr height=44 vAlign=top>
            <td><a onm ouseover="ChangeDiv('0','JKDiv_',2)" href="#">新闻一</a></td>
            <td bgColor=#ffffff width=1></td>
            <td><a onm ousemove="ChangeDiv('1','JKDiv_',2)" href="#">新闻二</a></td>
            <td bgColor=#ffffff width=1></td>
            <td><a onm ousemove="ChangeDiv('2','JKDiv_',2)" href="#">新闻三</a></td>
          </tr>
        </tbody>
      </table>
      <table id="JKDiv_0" style="background-color: #0b4ebf;display:block">
        <tbody>
          <tr>
            <td>000</td>
            <td>000</td>
            <td>000</td>
          </tr>
        </tbody>
      </table>
      <table id="JKDiv_1" style="background-color:#3071A9;display:none">
        <tbody>
          <tr>
            <td>111</td>
            <td>111</td>
            <td>111</td>
          </tr>
        </tbody>
      </table>
      <table id="JKDiv_2" style="background-color: #FF0000;display:none">
        <tbody>
          <tr>
            <td>111</td>
            <td>111</td>
            <td>111</td>
          </tr>
        </tbody>
      </table>
    </body>
  </html>

鼠标经过切换对应显示内容

 

上一篇:根据手机品牌判断进入对应的应用市场下载App的方法


下一篇:button点击跳转页面