Determine if browser is drag-and-drop capable?

后端 未结 5 563
礼貌的吻别
礼貌的吻别 2021-01-03 00:43

I\'m implementing jQuery File Upload and trying to figure out the best way to detect whether the client can support drag & drop so I can render something like \'Drag &am

5条回答
  •  难免孤独
    2021-01-03 01:10

    The current version of Modernizr, 2.6.2, includes a test for FileReader.

    Modernizr.filereader && Modernizr.draganddrop
    

    The filereader test is under the Non-core detects section. draganddrop is in the HTML5 section. Visit the Modernizr download page.

提交回复
热议问题