通过页面上的jQuery文件上载从Excel粘贴会导致上载

时间:2022-12-21 21:17:13

To boil it down, I have two inputs on the page. One is a text input, the other is a file input. If I copy and paste an Excel spreadsheet cell to the text input, it triggers a file upload to the file input. I'd like to allow copy-paste without triggering the file upload.

把它煮沸,我在页面上有两个输入。一个是文本输入,另一个是文件输入。如果我将Excel电子表格单元格复制并粘贴到文本输入,它会触发文件上传到文件输入。我想在不触发文件上传的情况下允许复制粘贴。

1 个解决方案

#1


6  

The key here is to set the pasteZone to null

这里的关键是将pasteZone设置为null

$("#fileupload").fileupload({
    pasteZone: null   //make it $(document) or specific container for enabling it
})

Documentation

Credit

#1


6  

The key here is to set the pasteZone to null

这里的关键是将pasteZone设置为null

$("#fileupload").fileupload({
    pasteZone: null   //make it $(document) or specific container for enabling it
})

Documentation

Credit