我有一个表单和Fine-uploader触发器。
这是我的HTML代码:
<div id="fine-uploader-trigger"></div>
<form action="new.php" name="user_video" method="post" id="qq-form">
<input type="text" name="mytext">
<button type="submit" class="btn btn-success">
<i class="fa fa-plus-circle" aria-hidden="true"></i> Submit
</button>
</form>
这是我的javascript代码:
<script type="text/javascript">
$(document).ready(function() {
var manualUploader = new qq.FineUploader({
autoUpload: false,
chunking: {
enabled: true,
concurrent: {
enabled: true
},
success: {
endpoint: "/libs/fine-uploader/endpoint.php?done"
}
},
debug: true,
element: document.getElementById('fine-uploader-trigger'),
request: {
endpoint: "/libs/fine-uploader/endpoint.php"
},
resume: {
enabled: true
},
retry: {
enableAuto: true,
showButton: true
},
template: 'qq-template-manual-trigger',
});
qq(document.getElementById("trigger-upload")).attach("click", function() {
manualUploader.uploadStoredFiles();
});
});
</script>
当我点击&#34;提交&#34;时,我的文件已上传但我的表单未提交:我无法使用我的PHP脚本保存(new.php)。
我试过了,但这是一样的:
callbacks: {
onAllComplete: function(succeeded, failed) {
$('#qq-form').submit();
},
},
你能帮帮我吗?谢谢:))