003.xhtml (654B)
1 <?xml version="1.0" encoding="utf-8"?> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>Dropzone attribute: link</title> 5 <style type="text/css"> 6 div 7 {background-color:navy; 8 width:40px; 9 height:40px; 10 padding:40px; 11 color:white;} 12 </style> 13 </head> 14 <body> 15 <p><a href="data:text/plain,1">Drag me</a></p> 16 <div dropzone="link string:text/plain" ondrop="document.querySelector('div').appendChild(document.createTextNode((event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'))"/> 17 <p>You should be able to drag link to navy box below. You should see word PASS once you drop it.</p> 18 </body> 19 </html>