搜索tooltip,基本上都是用div模拟的
解决方案 »
- Extjs中关于window.open()网页对话框问题
- 怎样删除一个id为123的table对象?
- 紧急求助。javascript实现插入falsh问题
- |zyciis| Javascript的方法如何写成 MessageBox.Show("哈哈")
- javascript修改form里的一些值以后如何阻止页面提交?
- 如何在自己制作的音乐播放器中加载百度音乐
- 哪位热心人有CHM格式的《JavaScript函数参考》,发一份给我,不胜感激!!!
- 请教:请问怎么在网页上“获取鼠标拖动选中的文字”?谢谢!
- 脚本中的事件捕捉处理方法中为什么不能写()?
- jquery怎么实现全选与取消
- 一个很菜的问题……
- 请教读取文件时的一个问题。
<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>