28,391
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function showdiv()
{
document.getElementById("d").style.display="";
}
function unshowdiv()
{
document.getElementById("d").style.display="none";
}
</script>
</head>
<body id="test">
<div onmouseover="showdiv()" style="cursor:hand;">小王</div>
<div id="d" style="display:none">
<table width="20%" border="1">
<tr><a href="#"><td>年龄:<%=rs(0)%></td></a></tr>
<tr><a href="#"><td>学历:<%=rs(1)%></td></a></tr>
<tr><a href="#"><TD>工资:<%=rs(2)%></TD></a></tr>
</table>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
#test a{position:relative;}
#test a:link div{display:none;}
#test a:link{color:blue;}
#test a:hover div{display:block;}
</style>
</head>
<body id="test">
<a href="#">张三
<div id="hide_1">年龄:36;学历:大专;工资:4000</div></a>
<a href="#">李四
<div id="hide_2">年龄:40;学历:中专;工资:8000</div></a>
</body>
</html>
<body id="test">
<script>
function fnShow(id, target){
//ajax请求取得内容后填充target的innerHTML
}
</script>
<a href="#" onmouseover="fnShow(1, 'hide_1')">张三
<div id="hide_1"></div></a>
<a href="#" onmouseover="fnShow(2, 'hide_2')">李四
<div id="hide_2"></div></a>
</body>
<a href="#this" onmouseover="show('姓名<br>工资<br>年龄');" onmouseout="hide();">删除</a>
<div id="alt" style="display:none; position:absolute;"></div>
<script language="javascript">
div = document.getElementById("alt");
function show(o){
var x=event.x;
var y=event.y;
div.style.display = "";
div.style.left = x+"px";
div.style.top = y +"px";
div.innerHTML = o;
}
function hide(){
div.style.display = "none";
div.innerHTML = "";
}
</script>
<div id="Alt"></div>
<script language="javascript">
function show(txt)
{
document.getElementById("Alt").innerHTML = txt;
}
</script>
<a href="#" onmouseover="show('姓名:<br> 工资<br> ');">显示</a>