<!doctype html>
<html>
  <head>
    <title>Dragging a file to the system</title>
    <style type="text/css">
span { display: inline-block; height: 100px; width: 100px; background: orange; }
    </style>
    <script type="text/javascript">
window.onload = function () {
  var drag = document.getElementsByTagName('span')[0];
  drag.ondragstart = function (e) {
    e.dataTransfer.setData('text','PASS');
    e.dataTransfer.effectAllowed = 'copy';
    var filein = document.getElementsByTagName('input')[0];
    if