<input type=button value=ok title="这是提示文字, 用title这个属性。">
解决方案 »
- 谁能告诉我怎么获取天气控件里面的值
- 如何自动获取页面上的对象的属性(new)
- 问下firefox和ie下,html用法一样么?
- ★★★这种打开新窗口的方法该如何实现?
- setInterval的问题
- javascript中能不能隐藏光标,但使用要不受影响?即只是看不到光标而已经?
- 初学,求教,关于将页面table中的数据导出到excel中,以及将excel中的数据导入到页面中,急!!!
- 有人会htc么?请赐教!!
- 有没有什么好的工具可以检测JAVASCRIPT在不同的阅览器中的效果
- 发送页面时,如果用javascript判断textfield中填入的是数字(只能填数字)
- 如何使首页全屏,点击其中一个链接后,使后继页面为正常显示(非全屏)?
- 请问一个关于对象引用的问题(在线请教!)
<input type="button" onmouseover="this.title = this.value + ':' + new Date().toString()" value="hello">
The code for the control:<OBJECT id=test type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"></OBJECT>
The JavaScript code to specify the text and font variables:<script>
FontFace="Verdana,8,,bold"
TopicText="This is an HTML Help pop-up window. This window can display text only."
TopicText2="This is another HTML Help pop-up window."
</script>
The JavaScript code to invoke the control:<a href="JavaScript:test.TextPopup (TopicText, FontFace, 10,10,10,10)"> TextPopup Example</a>
<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 bgcolor=#FF0000><tr><td align=center>层里文字</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>