我不知道这段代码有什么问题,但它显示错误消息“Uncaught TypeError:Illegal invocation”
import pandas as p
calendar = p.read_excel('../data/testdates.xlsx', parse_dates=['date'])
答案 0 :(得分:0)
将您的代码更改为:
$('.upload-document').on("click", function () {
$(this).parent().append("<input type='file' class='upload-btn' style='visibility:hidden' />");
$('.upload-btn').click();
})
$('body').on("change",'.upload-btn', function (e) {
var file = $(this)[0].files[0];
$.ajax({
type: 'POST',
url: "upload-file.php",
data: {
file: file
},
success: function (data) {
console.log(data);
}
});
})