找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1173|回复: 0

可拖动的菜单

[复制链接]

2074

主题

6459

回帖

45万

积分

管理员

夏天啊·····

积分
452930

王子的皇冠大富翁大众宠儿外太空使者社区居民

QQ
发表于 2006-4-14 13:10:43 | 显示全部楼层 |阅读模式
<STRONG><FONT size=2><FONT face=Arial><SPAN class=smalltxt twffan="done"><SPAN class=bold twffan="done">可拖动的菜单</SPAN></SPAN><BR><BR></FONT></FONT></STRONG><SPAN style="FONT-SIZE: 12px" twffan="done">&lt;html&gt;<BR>&lt;head&gt;&lt;title&gt;foolpot2001菜单&lt;/title&gt;<BR>&lt;style&gt;<BR>body,td,a {font-size:9pt;color:black}<BR>&#46;none{border:black 1px solid;backgroundp9D9D9;padding-top:2}<BR>&#46;over {border:black 1px solid;background:707888;color:white;padding-top:2}<BR>&lt;/style&gt;<BR>&lt;/head&gt;<BR>&lt;body&gt;<BR>&lt;div style="position:absolute; left: 100; top: 100;cursor: hand" ID=plane onmousedown="down=true;divleft=event&#46;clientX-parseInt(plane&#46;style&#46;left);divtop=event&#46;clientY-parseInt(plane&#46;style&#46;top)" onmouseup="down=false"&gt;<BR>&lt;div align=center style="position:absolute; left:150px; top:33px; width:100px; height:19px; z-index:1;color:white;background:707888;cursor:move" class="none" onmouseover="menuin();init()" onmouseout="menuout()"&gt;可拖动的菜单&lt;/div&gt;<BR>&lt;div align=center id="item1" style="position:absolute; left:50px; top:55px; width:99px; height:19px; z-index:2; filter:alpha(opacity=0)" onmouseover="this&#46;className='over';menuin()"<BR>onmouseout="this&#46;className='none';menuout()" class="none"<BR>&gt;菜单项一&lt;/div&gt;<BR>&lt;div align=center id="item2" style="position:absolute; left:250px; top:77px; width:99px; height:19px; z-index:3;filter:alpha(opacity=0)"<BR>class=none onmouseover="this&#46;className='over';menuin()"<BR>onmouseout="this&#46;className='none';menuout()"&gt;菜单项二&lt;/div&gt; <BR>&lt;div align=center id="item3" style="position:absolute; left:50px; top:99px; width:99px; height:19px; z-index:4; filter:alpha(opacity=0)"<BR>class=none onmouseover="this&#46;className='over';menuin()"<BR>onmouseout="this&#46;className='none';menuout()"&gt;菜单项三&lt;/div&gt;<BR>&lt;div align=center id="item4" style="position:absolute; left:250px; top:121px; width:99px; height:19px; z-index:5;filter:alpha(opacity=0)"<BR>class=none onmouseover="this&#46;className='over';menuin()"<BR>onmouseout="this&#46;className='none';menuout()"&gt;菜单项四&lt;/div&gt;  &lt;div align=center id="item5" style="position:absolute; left:50px; top:143px; width:99px; height:19px; z-index:6; filter:alpha(opacity=0)"<BR>class=none onmouseover="this&#46;className='over';menuin()"<BR>onmouseout="this&#46;className='none';menuout()"&gt;菜单项五&lt;/div&gt;<BR><BR>&lt;/div&gt;<BR>&lt;script language="vbs"&gt;<BR>dim down,divleft,divtop,timelinestart,timelinestop,tidone,tidtwo,tidtree<BR>down=false<BR>timelinestart=0<BR>timelinestop=0<BR>sub document_onmousemove<BR>if down then<BR>plane&#46;style&#46;left=window&#46;event&#46;clientx-divleft<BR>plane&#46;style&#46;top=window&#46;event&#46;clienty-divtop<BR>end if<BR>lt&#46;value=divleft<BR>tp&#46;value=divtop<BR>tx&#46;value=window&#46;event&#46;clientx<BR>ty&#46;value=window&#46;event&#46;clienty<BR>end sub<BR>sub document_ondargstart<BR>window&#46;event&#46;returnvalue=false<BR>end sub<BR>function menuin()<BR>cleartimeout(tidtree)<BR>end function<BR>function menuout()<BR>tidtree=settimeout("outit()",200)<BR>end function<BR>function init()<BR>if timelinestart&lt;&gt;5 then<BR>cleartimeout(tidtwo)<BR>item1&#46;style&#46;pixelLeft=item1&#46;style&#46;pixelLeft+20<BR>item1&#46;filters&#46;alpha&#46;opacity=item1&#46;filters&#46;alpha&#46;opacity+20<BR>item2&#46;style&#46;pixelLeft=item2&#46;style&#46;pixelLeft-20<BR>item2&#46;filters&#46;alpha&#46;opacity=item2&#46;filters&#46;alpha&#46;opacity+20<BR>item3&#46;style&#46;pixelLeft=item3&#46;style&#46;pixelLeft+20<BR>item3&#46;filters&#46;alpha&#46;opacity=item3&#46;filters&#46;alpha&#46;opacity+20<BR>item4&#46;style&#46;pixelLeft=item4&#46;style&#46;pixelLeft-20<BR>item4&#46;filters&#46;alpha&#46;opacity=item4&#46;filters&#46;alpha&#46;opacity+20<BR>item5&#46;style&#46;pixelLeft=item5&#46;style&#46;pixelLeft+20<BR>item5&#46;filters&#46;alpha&#46;opacity=item5&#46;filters&#46;alpha&#46;opacity+20<BR>timelinestart=timelinestart+1<BR>else<BR>cleartimeout(tidone)<BR>end if<BR>tidone=settimeout("init()",1)<BR>end function<BR>function outit()<BR>if timelinestart&lt;&gt;0 then<BR>cleartimeout(tidone)<BR>item1&#46;style&#46;pixelLeft=item1&#46;style&#46;pixelLeft-20<BR>item1&#46;filters&#46;alpha&#46;opacity=item1&#46;filters&#46;alpha&#46;opacity-20<BR>item2&#46;style&#46;pixelLeft=item2&#46;style&#46;pixelLeft+20<BR>item2&#46;filters&#46;alpha&#46;opacity=item2&#46;filters&#46;alpha&#46;opacity-20<BR>item3&#46;style&#46;pixelLeft=item3&#46;style&#46;pixelLeft-20<BR>item3&#46;filters&#46;alpha&#46;opacity=item3&#46;filters&#46;alpha&#46;opacity-20<BR>item4&#46;style&#46;pixelLeft=item4&#46;style&#46;pixelLeft+20<BR>item4&#46;filters&#46;alpha&#46;opacity=item4&#46;filters&#46;alpha&#46;opacity-20<BR>item5&#46;style&#46;pixelLeft=item5&#46;style&#46;pixelLeft-20<BR>item5&#46;filters&#46;alpha&#46;opacity=item5&#46;filters&#46;alpha&#46;opacity-20<BR>timelinestart=timelinestart-1<BR>else<BR>cleartimeout(tidtwo)<BR>end if<BR>tidtwo=settimeout("outit()",1)<BR>end function<BR>&lt;/script&gt;<BR>divleft:&lt;input id=lt&gt; divtop:&lt;input id=tp&gt;&lt;br&gt;<BR>clientx:&lt;input id=tx&gt; clienty:&lt;input id=ty&gt;<BR>&lt;/body&gt;<BR>&lt;/html&gt;</SPAN> <BR>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Enjoy Game

GMT+8, 2024-12-28 06:10 , Processed in 0.083125 second(s), 25 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表