Mouse through the display level two menu JS special effects _javascript Skills

Source: Internet
Author: User
Copy Code code as follows:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html;charset=gb2312"/>
<title> mouse through the display level two menu JS special effects </title>
<body>
<a href= "http://www.jb51.net" onmouseover= "showit (0)" > Yun-Habitat Community </a> | <a href= "http://play.jb51.net" onmouseover= "Showit (1)" > Player Home </a><br>
<div id= "describe" style= "width: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.jb51.net/" > cloud-Habitat Community </a> | <a href= "Http://play.jb51.net" > Player Home </a> | <a href= "http://sc.jb51.net/" > Material Home </a> | <a href= "http://mingzi.jb51.net/" > personal name Net </a> | <a href= "http://office.jb51.net/" >office home </a></b> '
submenu[1]= ' <b><a href= "http://www.jb51.net/" > cloud-Habitat Community </a> | <a href= "Http://play.jb51.net" > Player Home </a> | <a href= "http://sc.jb51.net/" > Material Home </a> | <a href= "http://mingzi.jb51.net/" > Personal name 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>
</tr>
</table>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.