关于文本框的定位问题 var showx = event.screenX - event.offsetX - 4 - 210 ; // LEFT var showy = event.screenY - event.offsetY + 18; // TOP; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 TO:wuxinlangman 不行诶 TO: kafly 得到 (0,0)好像不对诶 用一个position:absolute加一个position.relative可以解决定位的问题:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>JK:支持民族工业,尽量少买X货</title></head><SCRIPT LANGUAGE="JavaScript">function showTipsFun(obj){ tipsContent.innerHTML=obj.tipsStr; obj.insertAdjacentElement("beforeBegin",tipsContainer); tipsContainer.style.display="";}function hideTipsFun(obj){ tipsContainer.style.display="none";}</SCRIPT><body ><div id=tipsContainer style="position:absolute;display:none;"> <div id=tipsContent style="position:relative;top:25;background-color:#FFFFCC;border:1px solid #000000;z-index:1000;"></div></div><table border="1" width=500 > <tr> <td>focus出现提示:<input name="text" type=text onfocus="showTipsFun(this);" onblur="hideTipsFun(this);" tipsStr="提<font size=50px color=red>示</font>1"></td> <td><input name="text" type=text onfocus="showTipsFun(this);" onblur="hideTipsFun(this);" tipsStr="提示2"></td> </tr></table></body></html> 为什么IE提示无法打开站点??? 父窗口(可能会刷新)如何查找子窗口 var mywin=window.open错误提示mywin不是对象的问题。 怎么样求一个打开窗口的宽度 如何正确得到ActiveX里函数的返回值? 怎样用Javascript实现Base64的编码解码? 求助,用了<pre></pre>就无法实现自动换行了? 关于页面生成树形菜单的问题,达人帮忙啊,困扰了几天了!!! 请问用JAVASCRIPT怎么判断一个文本框里输入的是百分比的数? 怎样禁止图片缓存??? javascript检查输入是否为日文,高分求助在线等待,期待你的关注! 加了一句,做了一个下午
得到 (0,0)
好像不对诶
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JK:支持民族工业,尽量少买X货</title>
</head><SCRIPT LANGUAGE="JavaScript">
function showTipsFun(obj)
{
tipsContent.innerHTML=obj.tipsStr;
obj.insertAdjacentElement("beforeBegin",tipsContainer);
tipsContainer.style.display="";
}function hideTipsFun(obj)
{
tipsContainer.style.display="none";
}
</SCRIPT><body >
<div id=tipsContainer style="position:absolute;display:none;">
<div id=tipsContent style="position:relative;top:25;background-color:#FFFFCC;border:1px solid #000000;z-index:1000;"></div>
</div>
<table border="1" width=500 >
<tr>
<td>focus出现提示:<input name="text" type=text onfocus="showTipsFun(this);" onblur="hideTipsFun(this);" tipsStr="提<font size=50px color=red>示</font>1"></td>
<td><input name="text" type=text onfocus="showTipsFun(this);" onblur="hideTipsFun(this);" tipsStr="提示2"></td>
</tr>
</table></body>
</html>