1 / 8
文档名称:

html_网页自定义右键菜单.doc

格式:doc   页数:8
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

html_网页自定义右键菜单.doc

上传人:yunde112 2014/5/22 文件大小:0 KB

下载得到文件列表

html_网页自定义右键菜单.doc

文档介绍

文档介绍:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Transitional//EN" "/xhtml1/DTD/xhtml1-">
<html>
<head>
<title>超酷网页右键菜单</title>
<style type="text/css">
body { font-family: "宋体"; font-size: 12px; margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; }
.skin1 { padding-top: 4px; cursor: default; line-height: 24px; padding-left: 15px; z-index: 12; visibility: hidden; width: 158px; background-color: #F0F0F0; border: 1px solid buttonface; border: 2 outset buttonhighlight; }
/*定义菜单条的显示样式*/
.menuitems { padding: 2px 1px 2px 10px; }
</style>
<script language="javascript" type="text/javascript">
function f_Menu() {
var W = ; //网页可视宽度
var H = ; //网页可视高度
var X = ; //当前鼠标X坐标
var Y = ; //当前鼠标Y坐标
var rightW = - ;
var bottomH = - ;
if (rightW < )//如果从鼠标位置到窗口右边的空间小于菜单的宽度,就定位菜单的左坐标(Left)为当前鼠标位置向左一个菜单宽度
{
= (W - (W - X + )) + "px";
}
else //否则,就定位菜单的左坐标为当前鼠标位置
{
= X + "px";
}
if (bottomH < Y)//如果从鼠标位置到窗口下边的空间小于菜单的高度,就定位菜单的上坐标(Top)为当前鼠标位置向上一个菜单高度
{
= (H - (H - Y + )) + "px";
}
else //否则,就定位菜单的上坐标为当前鼠标位置