惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy International News Feed
Martin Fowler
Martin Fowler
D
Docker
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
U
Unit 42
T
Tailwind CSS Blog
J
Java Code Geeks
G
Google Developers Blog
MongoDB | Blog
MongoDB | Blog
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
美团技术团队
F
Fortinet All Blogs
N
News and Events Feed by Topic
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Recorded Future
Recorded Future
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
Hacker News: Ask HN
Hacker News: Ask HN
L
LINUX DO - 最新话题
Microsoft Security Blog
Microsoft Security Blog
N
News and Events Feed by Topic
I
Intezer
TaoSecurity Blog
TaoSecurity Blog
NISL@THU
NISL@THU
小众软件
小众软件
博客园 - 聂微东
博客园 - Franky
有赞技术团队
有赞技术团队
P
Palo Alto Networks Blog
爱范儿
爱范儿
H
Hacker News: Front Page
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cisco Blogs
P
Proofpoint News Feed
I
InfoQ
Google DeepMind News
Google DeepMind News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Vercel News
Vercel News
H
Heimdal Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
量子位

博客园 - 痴人说梦

批量清除数据库中被植入的垃圾信息 解决Windows Server2008R2中导入Excel不能使用Jet 4.0 asp.net(C#) 远程获取网页内容代码分享 JavaScript有关的10个怪癖和秘密 js javascript 鼠标控制图片左右滚动带自动翻滚,图片滑动新闻展示 - 痴人说梦 asp.net2.0邮箱发送代码 JS解析,格式化日期 JavaScript 实用脚本,很好,珍藏起来[转贴] WinForms / 23个.NET开源项目 使用js获取QueryString的方法小结 js实现图片高清晰等比缩小 ASP.NET使用NPOI类库导出Excel jQuery获取Select选择的Text和 Value(转) - 痴人说梦 - 博客园 IT项目管理工具总结 - 痴人说梦 - 博客园 有关类及类之间,类成员代码执行顺序链接 window.opener 的用法 用js进行url编码后用php反解以及用php实现js的escape功能函数总结 JS得到当前鼠标的位置 JCalendar 日历控件
div定位 鼠标放在按钮上显示层提示 - 痴人说梦 - 博客园
痴人说梦 · 2010-01-30 · via 博客园 - 痴人说梦

<div id="mydiv" name="mydiv" style="display:none"></div>
这是个层,可以在代码中出现在任何位置
<input type="text" id="mytext">
我现在要把div放在text的下面,也就是当div出现时,必须在text的正下方
---------------------------------------------------------------

<html><head><title>层与按钮对齐</title></head><body>
<div align=left><table border=1 width=600 height=50>
<tr align=center>
<td>
<input type=button value=ok onmouseover="cc(this)"
onmouseout="document.all.pop.style.display='none'">
</td><td>
<input type=button value=ok onmouseover="cc(this)"
onmouseout="document.all.pop.style.display='none'">
</td><td>
<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 bgcolor=#FF0000><tr><td>图层文字</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>