窗口拖动的问题?

playking 2002-04-04 11:32:18
如何用鼠标拖动一个除了body里的内容以外没有任何标题栏、状态栏、菜单栏....(什么都没有)的窗口移动?
或者有什么其他思路?(前提是窗口没有任何标题栏、状态栏、菜单栏....)
...全文
41 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
playking 2002-04-05
  • 打赏
  • 举报
回复
10毫秒来次settimeout,不断的检测鼠标状态,每个网站都这样机器要被累死!!哈哈!
Studio 2002-04-05
  • 打赏
  • 举报
回复
如果你现在还想要 就给你啊! 呵呵!
Studio 2002-04-05
  • 打赏
  • 举报
回复
我原来也想用 可是最后发现 有点细节处理不好
呵呵
不是我给code给你
是我马上下班了
而且网络出了点问题
playking 2002-04-05
  • 打赏
  • 举报
回复
to:Studio()
我还是不用你的方法了,settimeout不好,我知道几个概念就行了:
parent.moveto
window.event.screenX
window.event.screenY
其实我并不想要什么具体的代码,只是不知道上面的写法!

谢谢大家了!
给分!
srnld 2002-04-04
  • 打赏
  • 举报
回复
如果你想要可以留个EMAIL。
8988 2002-04-04
  • 打赏
  • 举报
回复
没有任何标题栏、状态栏、菜单栏....(什么都没有)的窗口,就只剩下边框和Body的内容了。那按住什么地方拖动窗口呢(你又要求除BODY以外)?MS可没有按住边框拖动的先例啊。
inanition 2002-04-04
  • 打赏
  • 举报
回复
你答应给500分我就回答你这个问题,因为我要花很多时间还想,你看着办吧。
playking 2002-04-04
  • 打赏
  • 举报
回复
to:Studio()
你为什么不用ondrag事件,而要settimeout呢?
playking 2002-04-04
  • 打赏
  • 举报
回复
明白了,框架是用parent.moveto
playking 2002-04-04
  • 打赏
  • 举报
回复
那个object是模拟最小化的,还可以用他不提示关闭和最大化等等!!!!
我以为是window.moveto,原来是parent.moveto
smalle 2002-04-04
  • 打赏
  • 举报
回复
这个网站很小家,源代码也不想给看,但我仍然看到了...
我发现他在末尾有这样一句话:<object id="ParentWindow" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><param name="command" value="MINIMIZE"></object>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="style.css">
<script language="JavaScript" src="function.js"></script>
<script language="JavaScript">
function MouseStatus()
{
this.x = null;
this.y = null;
this.bt = "up";
this.screeny = null;
this.screenx = null;
}
var Mouse = new MouseStatus();
function ActualizateMouseStatus()
{
e=event;
if ( e.type=="mousedown" && e.button!=1) return true;
if ( e.type == "mousedown" && e.button==1) Mouse.bt = "down";
else if ( e.type == "mouseup" ) Mouse.bt = "up";
Mouse.x=e.x;
Mouse.y=e.y;
Mouse.screenx=window.event.screenX;
Mouse.screeny=window.event.screenY;
}
document.onmousedown= ActualizateMouseStatus;
document.onmousemove= ActualizateMouseStatus;
document.onmouseup = ActualizateMouseStatus;
document.ondragstart= new Function("ActualizateMouseStatus; return false;");
var WindowBT="up";

function InitMoveWindow()
{
if(Mouse.y<=22 && Mouse.y>=0 && Mouse.bt=="up"){ WindowBT = "over" }
else if (Mouse.y<=22 && Mouse.y >=0 && WindowBT=="over" && Mouse.bt=="down")
{
ofx=Mouse.x;
ofy=Mouse.y;
WindowBT="down";
}
else if ( WindowBT == "down")
{
px=Mouse.screenx-ofx;
py=Mouse.screeny-ofy;
parent.moveTo(px,py);
}
setTimeout("InitMoveWindow()",10);
}
</script>
</head>
<body onload="InitMoveWindow();">
<table width="100%" cellspacing="0" cellpadding="0" style="position:absolute;left:0px;z-index:100" onmouseup="Title.bgColor='#FFDAFF'" onmousedown="Title.bgColor='#FFF6FF'">
<tr height="22">
<td><img src="./images/mark.gif" width="100%" height="100%"></td>
<td width="20" onclick="ParentWindow.Click();" onmouseover="MinButton.innerHTML='—'" onmouseout="MinButton.innerText='□'"><img src="./images/mark.gif" width="21" height="100%" style="cursor:hand"></td>
<td width="20" onclick="parent.close();" onmouseover="CloseButton.innerHTML='×'" onmouseout="CloseButton.innerText='⊙'"><img src="./images/mark.gif" width="21" height="100%" style="cursor:hand"></td>
</tr>
</table>
<table width="100%" height="100%" cellspacing="1" cellpadding="0" bgcolor="#000000">
<tr id="Title" bgcolor="#FFDAFF">
<td class="left"><font class="en" color="#000000"> 『精彩壁纸2002』- Lemonsoft MultiColor Explorer</font></td>
<td width="20"><font id="MinButton" class="ch" color="#000000" style="position:relative;left:1px;top:2px;font-size:15px;">□</font></td>
<td width="20"><font id="CloseButton" class="ch" color="#000000" style="position:relative;left:1px;top:1px;font-size:16px;">⊙</font></td>
</tr>
</table>
<object id="ParentWindow" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><param name="command" value="MINIMIZE"></object>
</body>
</html>
Studio 2002-04-04
  • 打赏
  • 举报
回复
那你就直接看代码啊!
分数嘛 你看着给好了
playking 2002-04-04
  • 打赏
  • 举报
回复
to:Studio()
效果就是那样,怎么做到的?请你赐教!
Studio 2002-04-04
  • 打赏
  • 举报
回复
http://61.139.76.236/gdh/
就是上面的哪个 可以不?
Studio 2002-04-04
  • 打赏
  • 举报
回复
wallpaper2002.yeah.net
的效果可以吗?
playking 2002-04-04
  • 打赏
  • 举报
回复
没有人说得具体些吗?
jim_k 2002-04-04
  • 打赏
  • 举报
回复
用层吧,代码去找一下吧,有点长啊
playking 2002-04-04
  • 打赏
  • 举报
回复
to:8988(晓月)
也可以按住body里的任何一个内容,只要能实现整个窗口的移动就可以了!
老大,如何实现呢?
playking 2002-04-04
  • 打赏
  • 举报
回复
to:srnld(天涯)
拜托了!谢谢!
playking 2002-04-04
  • 打赏
  • 举报
回复
playking@public.km.yn.cn

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧