怎样设置弹出窗口的相对位置~! 取触发事件的控件的座标及长宽,再设置要弹出窗口的位置(没做过,只这么想) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <input type=button onclick="PopWindow()" id="PopButton"><script>function PopWindow(){ window.open("about:blank","","top="+GetDefineY(PopButton)+" left="+GetDefineX(PopButton)+" width=100 height=100");}function GetDefineX(ObjectID){ var iPositionX=ObjectID.offsetLeft; while(ObjectID=ObjectID.offsetParent) { iPositionX+=ObjectID.offsetLeft; } return iPositionX;}function GetDefineY(ObjectID){ var iPositionY=ObjectID.offsetTop; while(ObjectID=ObjectID.offsetParent) { iPositionY+=ObjectID.offsetTop; } return iPositionY;}</script> 选中不同的下拉选项,让输入框自动清0 救命啊,这个该死的对象不支持此属性或方法 客户端对form的操作 [Help]switch如何嵌套switch 实现如 qq邮箱文本框 急fdn 请教三态树型结构 得到表单的属性值 qq怎么做手机端核pc端聊天 openlayers3保存地图遇到跨域问题如何解决? 打开一个新窗口,想让标题栏隐藏,有甚莫好办法吗!高手指教 这个网页对话框的参数怎样获取?在先等!
<input type=button onclick="PopWindow()" id="PopButton">
<script>
function PopWindow()
{
window.open("about:blank","","top="+GetDefineY(PopButton)+" left="+GetDefineX(PopButton)+" width=100 height=100");
}
function GetDefineX(ObjectID)
{
var iPositionX=ObjectID.offsetLeft;
while(ObjectID=ObjectID.offsetParent)
{
iPositionX+=ObjectID.offsetLeft;
}
return iPositionX;
}
function GetDefineY(ObjectID)
{
var iPositionY=ObjectID.offsetTop;
while(ObjectID=ObjectID.offsetParent)
{
iPositionY+=ObjectID.offsetTop;
}
return iPositionY;
}
</script>