你的openMenu() 显示层;closeMenu()隐藏层
你的鼠标移到层上执行openMenu() ,离开层执行closeMenu()。
那你的鼠标来回移动的话,不闪就怪了。
你的鼠标移到层上执行openMenu() ,离开层执行closeMenu()。
那你的鼠标来回移动的话,不闪就怪了。
解决方案 »
- art.dialog求解
- 想学人家做一个单选框的图片按钮,点击却没有反应。大晕,求指正!
- extjs在grid里边添加连接的问题
- 请教document.referrer取不到window.open来路的问题
- 看看这条语句再说吧.....呵呵
- 菜鸟问题
- 请教关于iframe动态设置scrolling的问题,请大家帮忙。谢谢!!
- JavaScript迷惑问题之九:如何对URL进行编码?
- 急需解决的几个问题,请大家知道的就告诉我,谢谢,在线等待!!!
- 移动端H5网页能不能只调取手机摄像头?
- 有4个层,我把他放在td里面,可是td的高度变成了4个层的高度之和了,我现在想把td的高度设置成一个层的高度,怎么办?
- JavaScript实现翻书特效,请问谁会?
你的鼠标移到层上执行openMenu() ,离开层执行closeMenu()。
那你的鼠标来回移动的话,不闪就怪了。我的鼠标没有离开层啊,去掉onMouseOver和onMouseOut事件就实现不了我要的效果,有没有其他的解决方法?????
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script></head><body>
<SCRIPT>
function openMenu(){
if (document.all) document.all.wei.style.visibility='visible';
if (document.getElementById) document.getElementById("wei").style.visibility='visible';
}function closeMenu(){
if (document.all) document.all.wei.style.visibility='hidden';
if (document.getElementById) document.getElementById("wei").style.visibility='hidden';
}
</SCRIPT>
<table width="112" height="10" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="10" onMouseenter='openMenu()' onMouseleave='closeMenu()'>
<p> </p></td>
</tr>
</table>
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 10px; top: 33px;">
<div id="wei" onMouseenter='openMenu()' onMouseleave='closeMenu()'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>sdfd</td>
<td><a href="dfg">df</a></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>df</td>
<td>sdf</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><a href="sdfd">sdf</a></td>
<td>df</td>
<td>df</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div>
</div>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script></head><body>
<SCRIPT>
function openMenu(){
if (document.all) document.all.wei.style.visibility='visible';
if (document.getElementById) document.getElementById("wei").style.visibility='visible';
}function closeMenu(){
if (document.all) document.all.wei.style.visibility='hidden';
if (document.getElementById) document.getElementById("wei").style.visibility='hidden';
}
</SCRIPT>
<table width="112" height="10" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="20" onMouseOver='openMenu()' onMouseOut='closeMenu()'>
</td></tr><tr><td>
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 24px; top: 50px;">
<div id="wei">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>sdfd</td>
<td><a href="dfg">df</a></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>df</td>
<td>sdf</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><a href="sdfd">sdf</a></td>
<td>df</td>
<td>df</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>