久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

獲取在字段上拖放的資源的 URL

Get URL of resource that is drag-and-dropped on field(獲取在字段上拖放的資源的 URL)
本文介紹了獲取在字段上拖放的資源的 URL的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我有一個帶有特定輸入字段的 html 頁面,我想添加以下功能.

I have an html page with a certain input field and I want to add the following functionality.

用戶應該能夠將資源拖放到字段上.這個動作的結果應該是資源的url出現在了字段中.

The user should be able to drag and drop a resource onto the field. The result of this action should be that the url of the resource appears in the field.

資源可以是一個本地文件,生成一個類似 file:///home/me/documentfile://c:windows-filesdocument 的 url.文檔.

The resource could be a local file, resulting in a url like file:///home/me/document or file://c:windows-filesdocument.doc.

該資源也可以是一個網絡資源,產生一個像 http://host.nl/document.doc 甚至 ftp://host.nl/document 這樣的 url.doc,盡管此時我對 ftp 資源并不感興趣.我假設來自網絡瀏覽器的地址欄中的網頁 url 的 dnd 操作,或者來自例如客戶端計算機上的文件的 dnd 操作.桌面.

The resource could also be a web resource, resulting in a url like http://host.nl/document.doc or even ftp://host.nl/document.doc, although at this point I'm not really interested in ftp resources. I'm assuming a dnd-action of a web-page url from the address bar of a web browser, or a dnd-action of a file on the client machine from e.g. the desktop.

與 Web 應用程序一樣,我希望此功能可以在大多數平臺上運行.(Linux/Win/MacOS, Firefox/Chrome/Safari/IE/Opera)

As usual for web apps, I want this functionality to work on most platforms. (Linux/Win/MacOS, Firefox/Chrome/Safari/IE/Opera)

范例是 html 和 JavaScript.

The paradigm is html and JavaScript.

推薦答案

在 Firefox 中你可以使用 file.mozFullPath.但是,此變量僅在 Firefox 中出現,在 Chrome 或 Safari 中不起作用.

In Firefox you can use file.mozFullPath. However, this variable presents only in Firefox and don't work in Chrome or Safari.

這篇關于獲取在字段上拖放的資源的 URL的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How can I get my jasmine tests fixtures to load before the javascript considers the document to be quot;readyquot;?(在 javascript 認為文檔“準備好之前,如何讓我的 jasmine 測試裝置加載?) - IT屋-程序員軟件開發技術
What do jasmine runs and waitsFor actually do?(jasmine 運行和等待實際上是做什么的?)
How to provide mock files to change event of lt;input type=#39;file#39;gt; for unit testing(如何提供模擬文件來更改 lt;input type=filegt; 的事件用于單元測試)
How to unit test a chained method using Jasmine(如何使用 Jasmine 對鏈式方法進行單元測試)
How do I inject $rootScope into an AngularJS unit test?(如何將 $rootScope 注入 AngularJS 單元測試?)
Jasmine - How to spy on a function call within a function?(Jasmine - 如何監視函數中的函數調用?)
主站蜘蛛池模板: 国产高潮好爽受不了了夜色 | 久久成人精品视频 | 免费的色网站 | 亚洲一区二区三区福利 | 91一区二区三区 | 91精品国产乱码麻豆白嫩 | 成人激情视频免费观看 | 欧美一区二区在线观看 | 成人在线视频观看 | 午夜视频在线观看网址 | 99精品久久久| 一区二区三区网站 | 亚洲国产一区二区在线 | 99视频网| 久久久精品一区 | 日本一区二区视频 | 狠狠躁夜夜躁人人爽天天高潮 | 综合精品久久久 | 精品欧美一区二区三区久久久 | 成人在线网 | 精品一区二区三区四区 | 久久1区 | 国产高清一区 | 久久国产精品亚洲 | www.国产一区 | 久久毛片| 国产高清精品在线 | 久久久久久久91 | 在线一区视频 | 精品美女视频在线观看免费软件 | 91五月婷蜜桃综合 | 免费在线观看一区二区三区 | 国产一级在线观看 | 国产蜜臀97一区二区三区 | av网站在线播放 | 国产免费a | 国产乱肥老妇国产一区二 | 久久久精品视频免费 | 免费v片在线观看 | 亚洲一本 | 狠狠色综合久久婷婷 |