如果我從Firefox中將選定的網頁拖放到HTML-Kit,HTML-Kit會詢問我是否要粘貼爲文本或HTML。如果我選擇 「的文字,」 我得到這個:如何在網頁或C#中讀取原始(CF_HTML)剪貼板數據?
Version:0.9
StartHTML:00000147
EndHTML:00000516
StartFragment:00000181
EndFragment:00000480
SourceURL:http://en.wikipedia.org/wiki/Herodotus
<html><body>
<!--StartFragment-->Additional details have been garnered from the <i><a href="http://en.wikipedia.org/wiki/Suda" title="Suda">Suda</a></i>, an 11th-century encyclopaedia of the <a href="http://en.wikipedia.org/wiki/Byzantium" title="Byzantium">Byzantium</a> which likely took its information from traditional accounts.<!--EndFragment-->
</body>
</html>
According to MSDN,這是 「CF_HTML」 格式的剪貼板數據。在OS X和Linux系統上它是一樣的嗎?
在網頁到網頁的拖放操作中,有沒有什麼辦法可以訪問這種詳細的信息(而不僅僅是普通的剪輯片段)?怎麼樣到C#WinForms桌面應用程序?
通過網頁到網頁,我的意思是從一個頁面拖到另一個文本,到文本框或文本區域。理想情況下,我想要做的就是訪問SourceURL屬性並找出數據來自哪裏。 – ine 2008-09-26 20:28:59