Simple menu -

zhaozj2021-02-16  73

Test.htm:

SDFD

The following is saved as "Menu.js"

TPOPWAIT = 50; TPOPSHOW = 3000; showPopstep = 3; popopacity = 100; cbgcolor = '# fffff'; cbolor = '# 000000'; cbordercolor = '# 000000';

SpoP = null; curshow = null; tfadeout = null; tfadein = null; tfadewaiting = null;

Document.write (""); document.write (". cpoptext {? background-color:" cbgcolor "; color:" ccolor "; border: 1px" cbordercolor "Solid; font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; Height: 20px; padding-top: 2px; padding-bottom: 2px; filter: alpha (opacity = 0)}; document.write (""); Document.write ("

");

Function showPopupText () {var o = event.x; mousex = event.x; mousey = event.y; if (o.alt! = null && o.alt! = ") {o.dy = o.alt; alalt = "}; if (o.title! = null&.title! =") {o.dy = o.title; o.title = "}; if (o.dy! = spop ) {Spop = o.dy; cleArtimeout; Cleartimeout; Cleartimeout; if (spop == null || spop == ") {dypoplayer.innerhtml =" " DyPoplayer.Style.Filter = "alpha ()"; dypoplayer.filters.alpha.opacity = 0;} else {if (o.dyclass! = null) popStyle = o.dyclass else popStyle = "cpoptext"; curshow = settimeout "showIt ()", tPopWait);}}} function showIt () {dypopLayer.className = popStyle; dypopLayer.innerHTML = sPop; popWidth = dypopLayer.clientWidth; popHeight = dypopLayer.clientHeight; if (MouseX 12 popWidth> document .body.clientWidth) popLeftAdjust = -popWidth-24 else popLeftAdjust = 0; if (MouseY 12 popHeight> document.body.clientHeight) popTopAdjust = -popHeight-24 else popTopAdjust = 0; dypopLayer.style.left = MouseX 12 Docume nt.body.scrollLeft popLeftAdjust; dypopLayer.style.top = MouseY 12 document.body.scrollTop popTopAdjust; dypopLayer.style.filter = "Alpha (Opacity = 0)"; fadeOut ();}

Function fadeout () {if (dypoplayer.filters.alpha.opacity

dypopLayer.filters.Alpha.opacity = showPopStep; tFadeOut = setTimeout ( "fadeOut ()", 20);} else {dypopLayer.filters.Alpha.opacity = popOpacity; tFadeWaiting = setTimeout ( "fadeIn ()", tPopShow);} }


New Post(0)