如何使javascript可重新排列窗口?

发布于 2024-09-02 08:29:32 字数 290 浏览 2 评论 0原文

我想制作一个包含多种类型表单的网页,每个表单位于不同的区域,允许重新排列这些区域,并且用户将能够根据自己的喜好更改其位置。(X 表单位于左上角,Y 表单位于左上角)到右下角等)我不知道这种类型的窗口叫什么,但我想你可以明白我在这里提到的内容。我唯一知道的是它可以用 javascript 实现,我搜索了它但我找不到相关的教程或自学指南。 有人请告诉我它们是什么,以及如何制作它们并将其包含在我的网页中?除了javascript之外,还有什么东西可以轻松制作这些东西吗?请为我提供一个学习资源,我非常感谢有知识的人的指导。提前致谢!

问候, 兰加纳。

I want to make a web page with several type of forms,each one on a different area that allows those areas to be rearranged and user will be able to change their position according to their preference.(X form to the left top, Y form to the right bottom etc.) i don't know what that type of windows are called, but think you can get a idea what I'm mentioning here.only thing i know is it can be achieved with javascript, i searched for it but i can't find the relevant tutorial or guide to self study.
some one please tell me what they are, and how to make them and include in my web page? is there any thing that ease of making those thing except javascript?please provide me a source of studying and i really appreciate the instructions of the knowledged people.thanks in advance!

regards,
rangana.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逆夏时光 2024-09-09 08:29:32

简而言之,您等待 mousedown 事件,存储有关单击开始位置和元素开始位置的信息,等待 mousemove 事件并更改这些位置,然后等待 mouseup 事件进行清理。

通常,最好通过使用 YUIjQuery UI

The nutshell version is that you wait for a mousedown event, store information about where the click started and where the element started, wait for a mousemove event and change those positions, then wait for a mouseup event to clean up afterwards.

Usually, this is best achieved by just using a library such as YUI or jQuery UI

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文