创建弹出菜单

<script> var oPopup = window.createPopup(); function richDropDown() { oPopup.document.body.innerHTML = oContextHTML.innerHTML; oPopup.show(0, 28, 305, 100, dropdowno); } function richToolTip() { var lefter = event.offsetY+0; var topper = event.offsetX+15; oPopup.document.body.innerHTML = oToolTip.innerHTML; oPopup.show(topper, lefter, 170, 120, ttip); } function richDialog() { oPopup.document.body.innerHTML = oDialog.innerHTML; oPopup.show(100, 50, 400, 300); } function richContext() { var lefter2 = event.offsetY+0; var topper2 = event.offsetX+15; oPopup.document.body.innerHTML = oContext2.innerHTML; oPopup.show(topper2, lefter2, 210, 88, contextobox); } </script> href="ms-help://Hx/HxRuntime/HxLink.css" type="text/css" rel="stylesheet" />

Four Exciting Uses of the Popup Object


1. Custom Context Menus

Context menus are accessed by clicking the right mouse button. Usually this displays a default context menu. Now you can create a customized context menu with the popup object.

Right-click inside this box.



2. Custom Menus
Creating custom menus is easy with the popup object. In the following example, the drop-down menu uses a gradient filter on each option and has a color scroll bar. Click the drop-down menu and then move the cursor over the options to see these effects.



3. Custom Message Boxes
All types of interactive message boxes can be easily created with the popup object. Click the button below.




4. Custom ToolTips
Using the popup object, web pages can now have ToolTips that are as dynamic as the pages themselves. In the following example, the popup object's position depends on where the mouse pointer is when the ToolTip is activated. Move the cursor over the green text to display a ToolTip.

Using Custom ToolTips enhance the web experience.



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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值