拖欧米茄下降 [英] drag-n-drop

查看:79
本文介绍了拖欧米茄下降的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个拖放脚本..我在这里找到了一个..
http://javascript.internet.com/page-...ag-n-drop.html


每个包含图像的div都有一个id,每个图像都有一个名称,如


< div id =" h" style =" position:absolute; left:100; top:350;">

< img src = http://javascript.internet.com/img/cards/hearts.gif name =" h">

< / div>


但是我没看到他在哪里引用这些id和名字在JS代码中..


函数用param''e''声明,但是我没有看到这个param是

传递给当他们被调用时起作用(因此称为:

document.onmousedown = MD;等等......)


我需要将其应用于div(包含一个表格),但是如果我将

相同的id和名称放在我的< divas中,他就在这里找到其中一个图像

doesn''工作..


我错过了什么请...谢谢..

解决方案

< blockquote> maya写道:


我需要一个拖放脚本..我在这里找到了一个..
http://javascript.internet.com/page-...ag-n-drop.html


每个包含图像的div都有一个id,每个图像都有一个名称,如


< div id =" h" style =" position:absolute; left:100; top:350;">

< img src = http://javascript.internet.com/img/cards/hearts.gif name =" h">

< / div>


但是我没看到他在哪里引用这些id和名字在JS代码中..


函数用param''e''声明,但是我没有看到这个param是

传递给当他们被调用时起作用(因此称为:

document.onmousedown = MD;等等......)


我需要将其应用于div(包含一个表格),但是如果我将

相同的id和名称放在我的< divas中,他就在这里找到其中一个图像

doesn''工作..


我错过了什么..谢谢..



好​​吧,我让它上班了对于我的桌子,但只有当我从

桌子的边缘拖动,而不是在桌子内..是否有办法做到这一点?


再次感谢。 。




maya写道:


我需要一个拖放脚本..我在这里找到了一个..
http://javascript.internet.com/page -... ag-n-drop.html



该脚本不是很好。甚至不能在Firefox中工作。相反,

检查这些:
http://www.dhtmlgoodies.com/index.html?page=dragDrop
http://www.walterzorn.com/dragdrop/dragdrop_e.htm



maya写道:


我需要一个拖放脚本..我在这里找到了一个..
http://javascript.internet.com/page-...ag -n-drop.html


每个包含图片的div都有一个id,每张图片都有一个名字,如


< div id =" h" style =" position:absolute; left:100; top:350;">

< img src = http://javascript.internet.com/img/cards/hearts.gif name =" h">

< / div>


但是我没看到他在哪里引用这些id和名字在JS代码中..


函数用param''e''声明,但是我没有看到这个param是

传递给当他们被调用时起作用(因此称为:

document.onmousedown = MD;等等......)


我需要将其应用于div(包含一个表格),但是如果我将

相同的id和名称放在我的< divas中,他就在这里找到其中一个图像

doesn''工作..



您使用的脚本非常陈旧,可能来自浏览器战争

时代。它不太可能在某些现代浏览器上运行。


Lasse Reichstein Nielsen经常在这里发帖给了一个很好的现代拖动

脚本大约2年前,并适用于我测试过的所有现代浏览器

。你可能会在Goggle找到他的帖子,搜索

。但是,为节省时间,您可以查看我的两个页面
http ://cwdjr.net/test/newDrag.html
http://www.cwdjr.net/test/picturePuzzle.html 。您将看到

脚本如何用于拖动图像,文本和包含3

图像的分区。


I need a drag-n-drop script.. I have found one here..
http://javascript.internet.com/page-...ag-n-drop.html

each div containing an image has an id, and each image has a name, as in

<div id="h" style="position:absolute;left:100;top:350;">
<img src=http://javascript.internet.com/img/cards/hearts.gif name="h">
</div>

but I don''t see where he references these id''s and names in the JS code..

functions are declared with param ''e'', but I don''t see this param being
passed to the functions when they''re called (called thus:
document.onmousedown = MD;.. etc..)

I need to apply this to a div (which contains a table), but if I put the
same id and name to my <divas he has here for one of the images it
doesn''t work..

what am I missing please.. thank you..

解决方案

maya wrote:

I need a drag-n-drop script.. I have found one here..
http://javascript.internet.com/page-...ag-n-drop.html

each div containing an image has an id, and each image has a name, as in

<div id="h" style="position:absolute;left:100;top:350;">
<img src=http://javascript.internet.com/img/cards/hearts.gif name="h">
</div>

but I don''t see where he references these id''s and names in the JS code..

functions are declared with param ''e'', but I don''t see this param being
passed to the functions when they''re called (called thus:
document.onmousedown = MD;.. etc..)

I need to apply this to a div (which contains a table), but if I put the
same id and name to my <divas he has here for one of the images it
doesn''t work..

what am I missing please.. thank you..

ok, I got it to work for my table, but only if I drag from edges of
table, not inside table.. is there a way to do this?

thanks again..



maya wrote:

I need a drag-n-drop script.. I have found one here..
http://javascript.internet.com/page-...ag-n-drop.html

That script is not very good. Doesn''t even work in Firefox. Instead,
check these out:
http://www.dhtmlgoodies.com/index.html?page=dragDrop
http://www.walterzorn.com/dragdrop/dragdrop_e.htm



maya wrote:

I need a drag-n-drop script.. I have found one here..
http://javascript.internet.com/page-...ag-n-drop.html

each div containing an image has an id, and each image has a name, as in

<div id="h" style="position:absolute;left:100;top:350;">
<img src=http://javascript.internet.com/img/cards/hearts.gif name="h">
</div>

but I don''t see where he references these id''s and names in the JS code..

functions are declared with param ''e'', but I don''t see this param being
passed to the functions when they''re called (called thus:
document.onmousedown = MD;.. etc..)

I need to apply this to a div (which contains a table), but if I put the
same id and name to my <divas he has here for one of the images it
doesn''t work..

The script you use is very old and likely comes from the browser war
era. It is not likely to work on some modern browsers.

Lasse Reichstein Nielsen who often posts here gave a good modern drag
script here about 2 years ago, and works on all of the modern browsers
on which I have tested it. You could likely find his post with a search
at Goggle. However, to save time, you might look at two of my pages at
http://cwdjr.net/test/newDrag.html and
http://www.cwdjr.net/test/picturePuzzle.html . You will see how the
script will work to drag images, text, and a division that contains 3
images.


这篇关于拖欧米茄下降的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆