求代码 在csdn看帖的时候,鼠标移到某个用户头像上面,弹出用户的详细信息怎么做?控制div显示隐藏和绝对位置吗?还有就是,好像每次打开一个帖子都是把那些用户信息下载完成,而不是用异步请求请高手们贴代码给我谢过! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果.net那几个大拿今天心情好,或者他们太忙了,也许你就不会挨喷.建议此帖迅速转到非技术区才能够免遭厄运 <html><head><style>.calendar_Layer_tablebg { background-color: #bc8e41;}.calendar_Layer_tablein { background-color: #FFFFFF;}</style><script language='javascript' type="text/javascript">var show=0;function get_pos_x(obj){ var x=obj.offsetLeft; while(obj.offsetParent){ obj=obj.offsetParent; x+=obj.offsetLeft; } return x;}function get_pos_y(obj){ var y=obj.offsetTop; while(obj.offsetParent){ obj=obj.offsetParent; y+=obj.offsetTop; } return y;}function show_img(obj,edate){ show++; if(!obj) return; var div_obj=document.getElementById('contents');if( 1==1 ) {//alert(get_pos_x(obj)); div_obj.innerHTML="<table cellpadding=\"1\" cellspacing=\"1\" class=\"calendar_Layer_tablebg\"><tr><td class=\"calendar_Layer_txt1\">" + edate + "</td></tr><tr><td class='calendar_Layer_tablein'>" + edate + "</td></tr></table>"; div_obj.style.left=get_pos_x(obj)+5; //x; div_obj.style.top=get_pos_y(obj)+15; //y; div_obj.style.display="inline"; }else div_obj.style.display="none";}function hide_img(){ if(--show>0) return; var div_obj=document.getElementById('contents'); div_obj.style.display='none';}</script></head><body><div class="calendar_Layer" id="contents" style="position:absolute;display:none" onmouseover="show_img()" onmouseout="window.setTimeout('hide_img()',5)"></div><table width="50%"><tr><td ><a href='' onmouseover="show_img(this,'2007-1-1')" onmouseout="window.setTimeout('hide_img()',5)" >用户1</a></td></tr><tr><td height='20'> </td></tr><tr><td ><a href='' onmouseover="show_img(this,'2007-1-5')" onmouseout="window.setTimeout('hide_img()',5)" >用户2</a></td></tr></table></body></html> 全不复制后,看效果吧。<head><title>图像效果演示</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script>/*舜子制作Made by PuterJam*///--初始化变量--var rT=true;//允许图像过渡var bT=true;//允许图像淡入淡出var tw=150;//提示框宽度var endaction=false;//结束动画var ns4 = document.layers;var ns6 = document.getElementById && !document.all;var ie4 = document.all;offsetX = 0;offsetY = 20;var toolTipSTYLE="";function initToolTips(){ if(ns4||ns6||ie4) { if(ns4) toolTipSTYLE = document.toolTipLayer; else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style; else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style; if(ns4) document.captureEvents(Event.MOUSEMOVE); else { toolTipSTYLE.visibility = "visible"; toolTipSTYLE.display = "none"; } document.onmousemove = moveToMouseLoc; }}function toolTip(msg, fg, bg){ if(toolTip.arguments.length < 1) // hide { if(ns4) { toolTipSTYLE.visibility = "hidden"; } else { //--图象过渡,淡出处理-- if (!endaction) {toolTipSTYLE.display = "none";} if (rT) document.all("msg1").filters[1].Apply(); if (bT) document.all("msg1").filters[2].Apply(); document.all("msg1").filters[0].opacity=0; if (rT) document.all("msg1").filters[1].Play(); if (bT) document.all("msg1").filters[2].Play(); if (rT){ if (document.all("msg1").filters[1].status==1 || document.all("msg1").filters[1].status==0){ toolTipSTYLE.display = "none";} } if (bT){ if (document.all("msg1").filters[2].status==1 || document.all("msg1").filters[2].status==0){ toolTipSTYLE.display = "none";} } if (!rT && !bT) toolTipSTYLE.display = "none"; //---------------------- } } else // show { if(!fg) fg = "#777777"; if(!bg) bg = "#eeeeee"; var content = '<table id="msg1" name="msg1" border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '" class="trans_msg"><td>' + '<table border="0" cellspacing="0" cellpadding="3" bgcolor="' + bg + '"><td width=' + tw + '><font face="Arial" color="' + fg + '" size="-2">' + msg + ' \;</font></td></table></td></table>'; if(ns4) { toolTipSTYLE.document.write(content); toolTipSTYLE.document.close(); toolTipSTYLE.visibility = "visible"; } if(ns6) { document.getElementById("toolTipLayer").innerHTML = content; toolTipSTYLE.display='block' } if(ie4) { document.all("toolTipLayer").innerHTML=content; toolTipSTYLE.display='block' //--图象过渡,淡入处理-- var cssopaction=document.all("msg1").filters[0].opacity document.all("msg1").filters[0].opacity=0; if (rT) document.all("msg1").filters[1].Apply(); if (bT) document.all("msg1").filters[2].Apply(); document.all("msg1").filters[0].opacity=cssopaction; if (rT) document.all("msg1").filters[1].Play(); if (bT) document.all("msg1").filters[2].Play(); //---------------------- } }}function moveToMouseLoc(e){ if(ns4||ns6) { x = e.pageX; y = e.pageY; } else { x = event.x + document.body.scrollLeft; y = event.y + document.body.scrollTop; } toolTipSTYLE.left = x + offsetX; toolTipSTYLE.top = y + offsetY; return true;}</script><style type="text/css"><!--.trans_msg { filter:alpha(opacity=100,enabled=1) revealTrans(duration=.2,transition=1) blendtrans(duration=.2); }--></style></head><script></script><body><div id="toolTipLayer" style="position:absolute; visibility: hidden"></div><script>initToolTips()</script><font face="Arial"><a href="#" onMouseOver="toolTip('<marquee><img src=image_06.jpg width=60 height=90></img>我酷呆了,o(∩_∩)o...哈哈</marquee>')" onMouseOut="toolTip()">test</a></font><font face="Arial"><a href="#" onMouseOver="toolTip('你要吗,好好用的哦真的', '#FFFF00', 'red')" onMouseOut="toolTip()">test</a></font><font face="Arial"><a href="#" onMouseOver="toolTip('这是个好东东<br>你说呢<br>哈哈', '#FFFF00', 'orange')" onMouseOut="toolTip()">test</a></font><font face="Arial"><a href="#" onMouseOver="toolTip('<marquee>跑啊!!跑</marquee>', '#FFFF00', 'orange')" onMouseOut="toolTip()">test</a></font></body> ASP.NET母版页中一个图片上定义了jquery 然后子页中就失效了 浏览器新开窗口问题 关于Gridview中label控件的问题 00 超级玛丽地图怎么做啊 框架程序设计 请问如何在asp.net 中上传2G以上的文件? 你遇到过吗 请问有没有办法通过后台实现对html的修改? <%# Bind("UseTime") %>怎么只显示时间? 使用万网空间和数据库,宣传支持 3.5;但是成员资格数据库有问题,请问如何解决,谢谢 登录页面输入错误也能跳转指定页面为什么
<html>
<head>
<style>
.calendar_Layer_tablebg {
background-color: #bc8e41;
}
.calendar_Layer_tablein {
background-color: #FFFFFF;
}
</style>
<script language='javascript' type="text/javascript">
var show=0;function get_pos_x(obj)
{
var x=obj.offsetLeft;
while(obj.offsetParent){
obj=obj.offsetParent;
x+=obj.offsetLeft;
}
return x;
}
function get_pos_y(obj)
{
var y=obj.offsetTop;
while(obj.offsetParent){
obj=obj.offsetParent;
y+=obj.offsetTop;
}
return y;
}
function show_img(obj,edate)
{
show++;
if(!obj) return;
var div_obj=document.getElementById('contents');
if( 1==1 ) {
//alert(get_pos_x(obj));
div_obj.innerHTML="<table cellpadding=\"1\" cellspacing=\"1\" class=\"calendar_Layer_tablebg\"><tr><td class=\"calendar_Layer_txt1\">" + edate + "</td></tr><tr><td class='calendar_Layer_tablein'>" + edate + "</td></tr></table>";
div_obj.style.left=get_pos_x(obj)+5; //x;
div_obj.style.top=get_pos_y(obj)+15; //y;
div_obj.style.display="inline";
}else div_obj.style.display="none";
}
function hide_img()
{
if(--show>0) return;
var div_obj=document.getElementById('contents');
div_obj.style.display='none';
}
</script>
</head>
<body>
<div class="calendar_Layer" id="contents" style="position:absolute;display:none" onmouseover="show_img()" onmouseout="window.setTimeout('hide_img()',5)"></div><table width="50%">
<tr>
<td ><a href='' onmouseover="show_img(this,'2007-1-1')" onmouseout="window.setTimeout('hide_img()',5)" >用户1</a></td>
</tr><tr><td height='20'> </td></tr><tr>
<td ><a href='' onmouseover="show_img(this,'2007-1-5')" onmouseout="window.setTimeout('hide_img()',5)" >用户2</a></td>
</tr>
</table>
</body>
</html>
<head>
<title>图像效果演示</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
/*
舜子制作
Made by PuterJam
*/
//--初始化变量--
var rT=true;//允许图像过渡
var bT=true;//允许图像淡入淡出
var tw=150;//提示框宽度
var endaction=false;//结束动画var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var ie4 = document.all;
offsetX = 0;
offsetY = 20;
var toolTipSTYLE="";
function initToolTips()
{
if(ns4||ns6||ie4)
{
if(ns4) toolTipSTYLE = document.toolTipLayer;
else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;
if(ns4) document.captureEvents(Event.MOUSEMOVE);
else
{
toolTipSTYLE.visibility = "visible";
toolTipSTYLE.display = "none";
}
document.onmousemove = moveToMouseLoc;
}
}
function toolTip(msg, fg, bg)
{
if(toolTip.arguments.length < 1) // hide
{
if(ns4)
{
toolTipSTYLE.visibility = "hidden";
}
else
{
//--图象过渡,淡出处理--
if (!endaction) {toolTipSTYLE.display = "none";}
if (rT) document.all("msg1").filters[1].Apply();
if (bT) document.all("msg1").filters[2].Apply();
document.all("msg1").filters[0].opacity=0;
if (rT) document.all("msg1").filters[1].Play();
if (bT) document.all("msg1").filters[2].Play();
if (rT){
if (document.all("msg1").filters[1].status==1 || document.all("msg1").filters[1].status==0){
toolTipSTYLE.display = "none";}
}
if (bT){
if (document.all("msg1").filters[2].status==1 || document.all("msg1").filters[2].status==0){
toolTipSTYLE.display = "none";}
}
if (!rT && !bT) toolTipSTYLE.display = "none";
//----------------------
}
}
else // show
{
if(!fg) fg = "#777777";
if(!bg) bg = "#eeeeee";
var content =
'<table id="msg1" name="msg1" border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '" class="trans_msg"><td>' +
'<table border="0" cellspacing="0" cellpadding="3" bgcolor="' + bg +
'"><td width=' + tw + '><font face="Arial" color="' + fg +
'" size="-2">' + msg +
' \;</font></td></table></td></table>'; if(ns4)
{
toolTipSTYLE.document.write(content);
toolTipSTYLE.document.close();
toolTipSTYLE.visibility = "visible";
}
if(ns6)
{
document.getElementById("toolTipLayer").innerHTML = content;
toolTipSTYLE.display='block'
}
if(ie4)
{
document.all("toolTipLayer").innerHTML=content;
toolTipSTYLE.display='block'
//--图象过渡,淡入处理--
var cssopaction=document.all("msg1").filters[0].opacity
document.all("msg1").filters[0].opacity=0;
if (rT) document.all("msg1").filters[1].Apply();
if (bT) document.all("msg1").filters[2].Apply();
document.all("msg1").filters[0].opacity=cssopaction;
if (rT) document.all("msg1").filters[1].Play();
if (bT) document.all("msg1").filters[2].Play();
//----------------------
}
}
}
function moveToMouseLoc(e)
{
if(ns4||ns6)
{
x = e.pageX;
y = e.pageY;
}
else
{
x = event.x + document.body.scrollLeft;
y = event.y + document.body.scrollTop;
}
toolTipSTYLE.left = x + offsetX;
toolTipSTYLE.top = y + offsetY;
return true;
}</script>
<style type="text/css">
<!--
.trans_msg
{
filter:alpha(opacity=100,enabled=1) revealTrans(duration=.2,transition=1) blendtrans(duration=.2);
}
-->
</style>
</head>
<script>
</script>
<body>
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script>initToolTips()</script>
<font face="Arial">
<a href="#" onMouseOver="toolTip('<marquee><img src=image_06.jpg width=60 height=90></img>我酷呆了,o(∩_∩)o...哈哈</marquee>')" onMouseOut="toolTip()">test</a></font>
<font face="Arial">
<a href="#" onMouseOver="toolTip('你要吗,好好用的哦真的', '#FFFF00', 'red')" onMouseOut="toolTip()">test</a></font>
<font face="Arial">
<a href="#" onMouseOver="toolTip('这是个好东东<br>你说呢<br>哈哈', '#FFFF00', 'orange')" onMouseOut="toolTip()">test</a></font>
<font face="Arial">
<a href="#" onMouseOver="toolTip('<marquee>跑啊!!跑</marquee>', '#FFFF00', 'orange')" onMouseOut="toolTip()">test</a></font>
</body>