English 中文(简体)
Drag和Droop使用j Query进入一个表格输入箱
原标题:Drag and Drop links into a form input box using jQuery
  • 时间:2010-08-28 00:58:13
  •  标签:
  • jquery

我有一个投入箱,我要拖拉,把连接点投向使用 j。 我的目标是,在图像链上点击碎/疏通链路,如果图像与图像或手套相连接,则把图像夹在外。

这是可能的吗? 没有人会想到任何这样的例子? 回答越好,请你说什么是行之有效的。

提前感谢!

Here is some more information for people who are interested: The drag and drop feature relies on browsers supporting File.API.

更多信息:

http://www.thebuzzmedia.com/html5-drag-and-drop-and-file-api-tutorial/

。 http://www.w3.org/TR/FileAPI/

让我知道,这是否有益,或者我是否能够提供更多信息。 感谢大家。

最佳回答

内容简单明了;至少,在我的浏览器(Chrome)中,把一个环节连接到投入/文稿中,并且与《URL》一样,固定参考资料是缺省功能;因此,应当做以下工作。

$("input").change(function() {
  if($(this).val().substring($(this).val().length-3, $(this).val().length) ==  jpg ) { 
    $("a img").attr( src , $(this).val())
  } else {
    $("a").attr( href , $(this).val())
  }
})

显然,你希望扩大该守则,以支持进一步的档案类型,我相信,找到“URL”是否指某一形象,但这是一个良好的起点。

如果这不符合你的具体需求,你可能想考虑在所涉投入箱上约束哪些活动;focus。 也可以是可行的选择?

问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签