漂亮的弹出窗口是如何实现的啊? http://www.scriptlover.com/pages/article.asp?ArticleID=61 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head><body><script> var inTable = false; var inDiv = false; var IsIE=!!document.all;if(!IsIE)HTMLElement.prototype.contains=function(o){ while(o!=null){ if(o==this)return true; o=o.parentNode; } return false;}function getPos(o){ var p=new Object(); p.x=o.offsetLeft; p.y=o.offsetTop+o.offsetHeight; while(o=o.offsetParent){ p.x+=o.offsetLeft;p.y+=o.offsetTop; } return p}function ShowDiv(o,click) {var p= getPos(o);var d=document.getElementById("testdiv");d.style.left=p.x+"px";d.style.top=p.y+"px";if(click){ if(d.style.display=="none"){d.style.display="block";inTable = false; } else d.style.display="none";}else{inTable = true; d.style.display = "block"; }} function HiddenDiv() { inTable = false; setTimeout("HiddenDivTimeOut()",3000); } function HiddenDivTimeOut() { if(inTable == false && inDiv == false) { document.getElementById("testdiv").style.display = "none"; } } function mouseoverDiv() { inDiv = true; } function mouseoutDiv(div,e) { e=e||event;var obj=e.relatedTarget||e.toElement;if(div.contains(obj))return;inDiv = false; if(inTable == false && inDiv == false) { document.getElementById("testdiv").style.display = "none"; } } </script> </head> <body> <a href="#" onmouseover="ShowDiv(this)" onmouseout="HiddenDiv()">鼠标滑过我</a><br/><br/><br/><br/><br/><br/><a href="#" onclick="ShowDiv(this,true)">鼠标点我</a><div id="testdiv" onMouseOver="mouseoverDiv()" onMouseOut="mouseoutDiv(this,event)" style="position:absolute; width:400;height:285; z-index:1; padding:5px; background-color: #E1E8FB; layer-background-color: #E1E8FB; border: 10px #ffffff;display:none; overflow-y:auto;"> <table width=200> <tr> <td> tabletabletabletdtatata </td> </tr> <tr> <td> tabletabletabletdtatata </td> </tr> <tr> <td> tabletabletabletdtatata </td> </tr> </table> </div> </body> </html> js问题 JS的代码 jquery 如何对这一段XML进行操作,忘达人指点迷津。。。 怎么设置jquery自动填充提示框里的内容显示 有针对.net的JavaScript框架吗?针对.NET应该学习怎么的JavaScript框架呢?请详细解答一下,谢谢 ext的grid中可以放tree控件吗?? 一个有关多选框控制的疑难问题 xmlhttp 乱码了 咋办 如何在两张静态html页面之间传递参数! 怎么在饼状图上添加点击事件 用javascript怎样获取后台数据? jsp验证多组单选表单是否都选,没有选择的提示当前所有未选项,急!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<script>
var inTable = false;
var inDiv = false; var IsIE=!!document.all;if(!IsIE)HTMLElement.prototype.contains=function(o){
while(o!=null){
if(o==this)return true;
o=o.parentNode;
}
return false;
}
function getPos(o){
var p=new Object();
p.x=o.offsetLeft;
p.y=o.offsetTop+o.offsetHeight;
while(o=o.offsetParent){
p.x+=o.offsetLeft;p.y+=o.offsetTop;
}
return p
}
function ShowDiv(o,click)
{
var p= getPos(o);var d=document.getElementById("testdiv");
d.style.left=p.x+"px";
d.style.top=p.y+"px";
if(click){ if(d.style.display=="none"){d.style.display="block";inTable = false; }
else d.style.display="none";
}
else{inTable = true; d.style.display = "block"; }
}
function HiddenDiv()
{
inTable = false;
setTimeout("HiddenDivTimeOut()",3000);
}
function HiddenDivTimeOut()
{
if(inTable == false && inDiv == false)
{
document.getElementById("testdiv").style.display = "none";
}
} function mouseoverDiv()
{
inDiv = true;
}
function mouseoutDiv(div,e)
{
e=e||event;
var obj=e.relatedTarget||e.toElement;
if(div.contains(obj))return;
inDiv = false;
if(inTable == false && inDiv == false)
{
document.getElementById("testdiv").style.display = "none";
}
}
</script>
</head>
<body>
<a href="#" onmouseover="ShowDiv(this)" onmouseout="HiddenDiv()">鼠标滑过我</a><br/><br/><br/><br/><br/><br/>
<a href="#" onclick="ShowDiv(this,true)">鼠标点我</a>
<div id="testdiv" onMouseOver="mouseoverDiv()" onMouseOut="mouseoutDiv(this,event)" style="position:absolute; width:400;height:285; z-index:1; padding:5px; background-color: #E1E8FB; layer-background-color: #E1E8FB; border: 10px #ffffff;display:none; overflow-y:auto;">
<table width=200>
<tr>
<td>
tabletabletabletdtatata
</td>
</tr>
<tr>
<td>
tabletabletabletdtatata
</td>
</tr>
<tr>
<td>
tabletabletabletdtatata
</td>
</tr>
</table>
</div> </body>
</html>