社区
JavaScript
帖子详情
怎么样在文字连接上显示图片,在线等待!!!100分求解
17skyo
2002-12-03 12:58:00
我想在文字连接上,鼠标移上去,显示图片
显示文字,我知道用title=""能实现,显示图片怎么做
请问怎么做
...全文
138
4
打赏
收藏
怎么样在文字连接上显示图片,在线等待!!!100分求解
我想在文字连接上,鼠标移上去,显示图片 显示文字,我知道用title=""能实现,显示图片怎么做 请问怎么做
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
17skyo
2002-12-03
打赏
举报
回复
知道ichat聊天室吗,
他的名单里,有鼠标移动上去,就能显示图片,但是好象不是用层的
lbd8848
2002-12-03
打赏
举报
回复
那只能用层,做一个虚拟的
meizz
2002-12-03
打赏
举报
回复
<html><head><title>层与按钮对齐</title></head><body>
<div align=left><table border=1>
<tr><td align=center height=50 width=200>
<input type=button value=ok onmouseover="cc(this)" onmouseout="document.all.pop.style.display='none'"></td>
<td align=center height=50 width=200>
<input type=button value=ok onmouseover="cc(this)" onmouseout="document.all.pop.style.display='none'"></td>
<td align=center height=50 width=200>
<input type=button value=ok onmouseover="cc(this)" onmouseout="document.all.pop.style.display='none'"></td></tr>
<tr><td align=center height=50 width=200>
<input type=button value=ok onmouseover="cc(this)" onmouseout="document.all.pop.style.display='none'"></td>
<td align=center height=50 width=200>
<input type=button value=ok onmouseover="cc(this)" onmouseout="document.all.pop.style.display='none'"></td>
<td align=center height=50 width=200>
<input type=button value=ok onmouseover="cc(this)" onmouseout="document.all.pop.style.display='none'"></td></tr>
<tr><td align=center height=50 width=200>
<input type=button value=ok onmouseover="cc(this)" onmouseout="document.all.pop.style.display='none'"></td>
<td align=center height=50 width=200>
<input type=button value=ok onmouseover="cc(this)" onmouseout="document.all.pop.style.display='none'"></td>
<td align=center height=50 width=200>
<input type=button value=ok onmouseover="cc(this)" onmouseout="document.all.pop.style.display='none'"></td></tr>
</table><div>
<div id=pop style="position:absolute;width:100;height:50;z-index:99;display:none">
<table border=0><tr><td align=center>
<img src=http://expert.csdn.net/images/csdn.gif border=0></td></tr></table></div>
<script language=javascript>
function cc(tt)
{
var daps = document.all.pop.style;
var ttop = tt.offsetTop; //TT控件的定位点高
var thei = tt.clientHeight; //TT控件本身的高
var tleft = tt.offsetLeft; //TT控件的定位点宽
var ttyp = tt.type; //TT控件的类型
while (tt = tt.offsetParent){ttop+=tt.offsetTop; tleft+=tt.offsetLeft;}
daps.top = (ttyp=="image")? ttop+thei : ttop+thei+6; //层的 Y 坐标
daps.left = tleft + 1; //层的 X 坐标
daps.display = ""; //层显示
}
</script>
</body></html>
qiushuiwuhen
2002-12-03
打赏
举报
回复
搜索tooltip,基本上都是用div模拟的
易语言源码易模块添加图标
易语言源码易模块添加图标
testttttttttttttttttt
testttttttttttttttttt
JavaScript
87,990
社区成员
224,684
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章