Home > Web Front-end > JS Tutorial > Recommended: Extremely Cool Right-Click Menu_Typical Special Effects

Recommended: Extremely Cool Right-Click Menu_Typical Special Effects

WBOY
Release: 2016-05-16 19:23:48
Original
971 people have browsed it

Copy code The code is as follows:

点击右键看看!


onmousedown="down=true;divleft=event.clientX-parseInt(plane.style.left);
divtop=event.clientY-parseInt(plane.style.top)" onmouseup="down=false">
onmouseover="menuin();init()">右键菜单

onmouseout="this.className='none';" class="none"
>网络学院

class=none onmouseover="this.className='over';menuin()"
onmouseout="this.className='none';">菜单项二

class=none onmouseover="this.className='over';menuin()"
onmouseout="this.className='none';">菜单项三

class=none onmouseover="this.className='over';menuin()"
onmouseout="this.className='none';">菜单项四
 
class=none onmouseover="this.className='over';menuin()"
onmouseout="this.className='none';">菜单项五



dim down,divleft,divtop,timelinestart,timelinestop,tidone,tidtwo,tidtree
down=false
timelinestart=0
timelinestop=0
sub document_onmousedown
if window.event.button=2 then
plane.style.display=""
plane.style.left=window.event.clientx-153
plane.style.top=window.event.clienty-35
end if
end sub
sub document_onmousemove
if down then
plane.style.left=window.event.clientx-divleft
plane.style.top=window.event.clienty-divtop
end if
end sub
sub document_ondargstart
window.event.returnvalue=false
end sub
function menuin()
cleartimeout(tidtree)
end function
sub document_onclick
tidtree=settimeout("outit()",200)
end sub
function init()
if timelinestart<>5 then
cleartimeout(tidtwo)
item1.style.pixelLeft=item1.style.pixelLeft 20
item1.filters.alpha.opacity=item1.filters.alpha.opacity 20
item2.style.pixelLeft=item2.style.pixelLeft-20
item2.filters.alpha.opacity=item2.filters.alpha.opacity 20
item3.style.pixelLeft=item3.style.pixelLeft 20
item3.filters.alpha.opacity=item3.filters.alpha.opacity 20
item4.style.pixelLeft=item4.style.pixelLeft-20
item4.filters.alpha.opacity=item4.filters.alpha.opacity 20
item5.style.pixelLeft=item5.style.pixelLeft 20
item5.filters.alpha.opacity=item5.filters.alpha.opacity 20
timelinestart=timelinestart 1
else
cleartimeout(tidone)
end if
tidone=settimeout("init()",1)
end function
function outit()
if timelinestart<>0 then
cleartimeout(tidone)
item1.style.pixelLeft=item1.style.pixelLeft-20
item1.filters.alpha.opacity=item1.filters.alpha.opacity-20
item2.style.pixelLeft=item2.style.pixelLeft 20
item2.filters.alpha.opacity=item2.filters.alpha.opacity-20
item3.style.pixelLeft=item3.style.pixelLeft-20
item3.filters.alpha.opacity=item3.filters.alpha.opacity-20
item4.style.pixelLeft=item4.style.pixelLeft 20
item4.filters.alpha.opacity=item4.filters.alpha.opacity-20
item5.style.pixelLeft=item5.style.pixelLeft-20
item5.filters.alpha.opacity=item5.filters.alpha.opacity-20
timelinestart=timelinestart-1
else
cleartimeout(tidtwo)
plane.style.display="none"
exit function
end if
tidtwo=settimeout("outit()",1)
end function
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template