zoukankan      html  css  js  c++  java
  • 鼠标经过显示二级菜单的js特效

    本文章来给大家推荐一个不错的鼠标经过显示二级菜单js特效效果,有需要了解的朋友可以参考一下

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
    <title>鼠标经过显示二级菜单js特效-www.jbxue.com</title>
    </head>
    <body>
    <a href="http://www.jbxue.com" onMouseover="showit(0)">脚本学堂</a> | <a href="#" onMouseover="showit(1)">播放器之家</a><br>
    <div id="describe" style="600px;height:40px; margin-top:10px;" onMouseover="clear_delayhide()" onMouseout="resetit(event)"></div>
    <script language="JavaScript1.2">
    var submenu=new Array()
    submenu[0]='<b><a href="http://www.jbxue.com/">脚本学堂</a> | <a href="#">播放器之家</a> | <a href="http://sc.jb15.net/">素材之家</a> | <a href="http://mingzi.jb15.net/">个性名字网</a> | <a href="http://office.jb15.net/">Office之家</a></b>'
    submenu[1]='<b><a href="http://www.jbxue.com/">脚本学堂</a> | <a href="http://play.jb15.net">播放器之家</a> | <a href="http://sc.jb16.net/">素材之家</a> | <a href="http://mingzi.jb15.net/">个性名字网</a></b>'
    var delay_hide=500
    var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""
    function showit(which){
    clear_delayhide()
    thecontent=(which==-1)? "" : submenu[which]
    if (document.getElementById||document.all)
    menuobj.innerHTML=thecontent
    else if (document.layers){
    menuobj.document.write(thecontent)
    menuobj.document.close()
    }
    }
    function resetit(e){
    if (document.all&&!menuobj.contains(e.toElement))
    delayhide=setTimeout("showit(-1)",delay_hide)
    else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
    delayhide=setTimeout("showit(-1)",delay_hide)
    }
    function clear_delayhide(){
    if (window.delayhide)
    clearTimeout(delayhide)
    }
    function contains_ns6(a, b) {
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;
    }
    </script>
    </body>
    </html></td>
    </tr>
    </table>
  • 相关阅读:
    editplus 支持lua语言语法高亮显示
    云服务器使用: 域名备案
    2-使用git管理一个单片机程序
    1-git的安装和基本使用
    编译lua固件NodeMcu 8266
    linux 安装Apache服务器
    2-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(监听Wi-Fi和APP的数据)
    Spring源码学习之:ClassLoader学习(3)
    Spring源码学习之:ClassLoader学习(2)
    Spring源码学习之:ClassLoader学习(1)
  • 原文地址:https://www.cnblogs.com/cfinder010/p/3256380.html
Copyright © 2011-2022 走看看