简体   繁体   中英

getting a file location from IE9 drag or drop event

Is it at all possible to get the filename location from a drag or drop event in IE9 ?

i've tried:

    $('#myDiv').addEventListener('drop', function (e) {
            e.preventDefault();

            if (e.dataTransfer.files === undefined) // <-- true

or

    $('#dropTarget').on('drop', function(e){
        if(e.originalEvent.dataTransfer){
            if(e.originalEvent.dataTransfer.files.length) // <-- files is undefined.. 

are there any other tricks that could be done to get that location on a drag/drop in IE9?

IE 9 does not support the File API Here is a compatibility chart

http://caniuse.com/#search=fileapi

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM