Div表作为上下文菜单 [英] Div table as context menu

查看:143
本文介绍了Div表作为上下文菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的aspx页面中有以下div表,当我在IE中打开该页面时,它工作正常,但在FF或Chrome中不起作用.

可能是什么问题呢?当鼠标聚焦在指定的链接上时,它将使用查看端口和javascript显示菜单.

I have the following div table in my aspx page, it is working fine when I opened the page in IE, but not working in FF or Chrome.

What could be the problem? It is using the view port and javascript to display the menu when the mouse is focused on the link specified.

<div class="menu" id="Projects" style="Z-INDEX: 101">
			<table border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" id="menuTable">
				<tr>
					<td bgcolor="#999999" onmouseenter="mhHover('menuTable', 0, 'LineEffectOver')" onmouseleave="mhHover('menuTable', 0, 'LineEffectOut')">
						Add Project
					</td>
				</tr>
				<tr>
					<td bgcolor="#999999" style="border-top-style: solid; border-top-width: 0" onmouseenter="mhHover('menuTable', 1, 'LineEffectOver')" onmouseleave="mhHover('menuTable', 1, 'LineEffectOut')">
					  Edit Project
					</td>
				</tr>	
				<tr>
					<td bgcolor="#999999" onmouseenter="mhHover('menuTable', 2, 'LineEffectOver')" onmouseleave="mhHover('menuTable', 2, 'LineEffectOut')" style="border-top-style: solid; border-top-width: 0">
						 Delete Project
					</td>
				</tr>
			</table>
		</div>

推荐答案

将鼠标放在链接上时,使用onMouseOver 事件而不是onMouseleave来显示Div as Context菜单.
Use onMouseOver event instead of onMouseleave for showing a Div as Context menu when you place your mouse on the link.


这篇关于Div表作为上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆