我正在使用 jTable 进行 CRUD 操作。但现在我想使用 jTable 创建对话框表单上传文件
How do i upload file using jTable create dialog?
<div id="PersonTable" style="width: 580px; margin: auto;"></div>
<script type="text/javascript">
$(document).ready(function () {
//Prepare jtable plugin
$('#PersonTable').jtable({
title: 'The Campus List',
actions: {
listAction: '/Home/CampusList',
deleteAction: '/Home/DeletePerson',
updateAction: '/Home/UpdatePerson',
createAction: '/Home/CreatePerson'
},
paging: true,
fields: {
CampusId: {
key: true,
create: false,
edit: false,
list: true
},
CampusName: {
title: 'CampusName',
width: '15%'
},
CampusCode: {
title: 'CampusCode',
list: true
},Image: { } // for uploading file
}
});
//Load person list from server
$('#PersonTable').jtable('load');
});
</script>