就是鼠标移动到 "让我们共同实现智慧的地球" 上的时候出现 一个div层。谢谢!1:鼠标没移上去2:鼠标移上去3:鼠标移移开
解决方案 »
- 如何让ligerTip显示validate中的错误信息
- 求一个js版的treeview
- 求救:jquery的dialog控件很大
- 求一简单的EXT刷新功能
- 给一个判断开始日期到结束日期在一个月之内的函数!
- JS对象的proto属性和函数对象prototype的关系
- xLoadTree可以指定展开某个节点吗?或者别的异步技术的树有此功能
- 二级联动问题,不知哪错了,急~~~
- window.close()为什么不好使呢.非常报歉,本人已经无分可送了.
- 可不可以打开一个像模态对话框一样的窗口,让他一直在其它窗口的前面?在线等
- 关于ckeditor3.2.1加webEq的问题,熟者进
- 如何在<head></head>中给一个下拉控件定义onchange事件
onmouseover时显示 onmouseout隐藏
2.onmouseover时判断这个悬浮div存在不存在 如果存在 直接显示 如果没有create一个div 控制位置 z-index和div里内容 append进页面 onmouseout时移除或隐藏
不知道 楼上的大哥怎么处理的,能给代码吗?谢谢
getAbsoluteLeft: function (ob) {
var mendingLeft = ob.offsetLeft;
while (ob != null && ob.offsetParent != null && ob.offsetParent.tagName != "BODY") {
mendingLeft += ob.offsetParent.offsetLeft;
ob = ob.offsetParent;
}
return mendingLeft;
},
getAbsoluteTop: function (ob) {
var mendingTop = ob.offsetTop;
while (ob != null && ob.offsetParent != null && ob.offsetParent.tagName != "BODY") {
mendingTop += ob.offsetParent.offsetTop;
ob = ob.offsetParent;
}
return mendingTop;
},
getAbsoluteHeight: function (ob) {
return ob.offsetHeight
},
getAbsoluteWidth: function (ob) {
return ob.offsetWidth
}
}
我做出来了 ,但是有个问题 就是在这个出现的div里如果有<a herf 这样的链接的话,鼠标移上去,div会消失。不知道怎么解决这个问题?
<div onmouseout="discontrol('ondiv1')" id="ondiv1" style=" display:none; position:absolute; background-color:#fff; border:4px solid #cccccc;width:235px;color:#000;height:191px;margin-top:800px;z-index:999;margin-left:15px;">介绍信息.....<a href="showProducts.aspx?articleid=271">点击了解更多...</a>
<div onmouseover="discontrol('ondiv1')" class="index_1product">
<script type="text/javascript">
function discontrol(itemid) {
if (document.getElementById(itemid).style.display == 'none') {
document.getElementById(itemid).style.display = "";
}
else {
document.getElementById(itemid).style.display = "none";
}
}
</script>