Javascript Context Menu Ex - dhtml popup menu mode

from: http://dhtml-menu.com/examples/ex8-javascript-context-menu.html

http://dhtml-menu.com/examples/data-popup2.js.txt

 

 

ExpandedBlockStart.gif 代码
 1  var  popupMode = 1 ;
 2 
 3  var  blankImage = " img/blank.gif " ;
 4  var  isHorizontal = 0 ;
 5  var  menuWidth = 0 ;
 6  var  absolutePos = 0 ;
 7  var  posX = 20 ;
 8  var  posY = 10 ;
 9  var  floatable = 0 ;
10  var  floatIterations = 5 ;
11  var  movable = 0 ;
12  var  moveCursor = " move " ;
13  var  moveImage = " img/movepic4.gif " ;
14  var  moveWidth = 12 ;
15  var  moveHeight = 18 ;
16  var  fontStyle = " normal 8pt Tahoma " ;
17  var  fontColor = [ " #3B3B3B " , " #FFFFFF " ];
18  var  fontDecoration = [ " none " , " none " ];
19  var  itemBackColor = [ " #FFFFEE " , " #4D74FD " ];
20  var  itemBorderWidth = 0 ;
21  var  itemAlign = " left " ;
22  var  itemBorderColor = [ "" , "" ];
23  var  itemBorderStyle = [ " solid " , " solid " ];
24  var  itemBackImage = [ "" , "" ];
25  var  itemSpacing = 0 ;
26  var  itemPadding = 2 ;
27  var  itemCursor = " default " ;
28  var  itemTarget = "" ;
29  var  iconTopWidth = 16 ;
30  var  iconTopHeight = 16 ;
31  var  iconWidth = 16 ;
32  var  iconHeight = 16 ;
33  var  menuBackImage = "" ;
34  var  menuBackColor = "" ;
35  var  menuBorderColor = " #BFBFBF #737373 #4D4D4D #AAAAAA  " ;
36  var  menuBorderStyle = [ " solid " ];
37  var  menuBorderWidth = 1 ;
38  var  subMenuAlign = " left " ;
39  var  transparency = 80 ;
40  var  transition = 10 ;
41  var  transDuration = 300 ;
42  var  shadowColor = " #C7C7C7 " ;
43  var  shadowLen = 3 ;
44  var  arrowImageMain = [ " img/arrow_r.gif " , " img/arrow_r.gif " ];
45  var  arrowImageSub = [ " img/arrow_r.gif " , " img/arrow_r.gif " ];
46  var  arrowWidth = 7 ;
47  var  arrowHeight = 7 ;
48 
49  var  separatorImage = " img/separ1.gif " ;
50  var  separatorWidth = " 100% " ;
51  var  separatorHeight = " 5 " ;
52  var  separatorAlignment = " center " ;
53 
54  var  separatorVImage = " img/separ1.gif " ;
55  var  separatorVWidth = " 100& " ;
56  var  separatorVHeight = " 5 " ;
57  var  statusString = " text " ;
58  var  pressedItem =- 2 ;
59 
60  var  menuItems  =  [
61     [ " Open Link " , " testlink.html " ],
62     [ " Open Link in New Window " , " testlink.html " , "" , "" , "" , " _blank " ],
63     [ " More Info " , " testlink.html " ],
64       [ " |Help " , " testlink.html " ],
65       [ " |About " , " testlink.html " ],
66  ];
67 
68  apy_init();
69 

 

 

 

Popup Mode Example 

Right click on document space to call a right-click context menu.
HTML:
<body bgcolor=#FFFFFF onContextMenu="return apy_popup(1, 1000, event);">
Mouseover the image to see a context dhtml menu:
HTML:
<img src="img/foto1.gif" width=90 height=98 hspace=10 onMouseOver="return apy_popup(0, 2000, event);" align=left>
Javascript Context Menu Ex - dhtml popup menu mode - geovindu - Geovin Du Dream Park
Mouseover this link to see a second context dhtml menu
HTML:
<a href="testlink.html" onMouseOver="return apy_popup(1, 1000, event);">
Click this link to see a second context dhtml menu
HTML:
<a href="#" onClick="return apy_popup(1, 1000, event);">
To create a popup menu you should set following parameters:
var popupMode=1;
To show a popup menu assign the following function call to event:
yourEvent = "return apy_popup(menuN, pause, event);"
Where:
    yourEvent - event type (onMouseOver, onClick, onContextMenu, etc.)
    menuN - menu number on page.
    pause - inactivity delay.
    event - reserved. Do not change.
For example:
    <img src="pic" onMouseOver="return apy_popup(0, 2000, event);">
To see configuration file (.js file) click here: popup-menu 1 popup-menu 2.

 

转载于:https://www.cnblogs.com/geovindu/archive/2010/12/18/1909835.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值