我有上傳的形式JavaScript表單提交等到完成
<form action="../upload" method="post" id="upload_form" enctype="multipart/form-data" target="upload_frame" >
<input name="file" type="file" />
</form>
,它是使用JavaScript形成另一種形式提交按鈕
function upload(){
var uploadForm = document.getElementById('upload_form');
uploadForm.submit();
console.log('this should be called when the form finishes upload and respone is committed');
}
,請告訴我們,如果例子是不夠
明確提出
@Yve我理解爲「我要當服務器收到請求,並回答知道」。換句話說,它看起來像OP正在尋找一種方法來確定文件何時被髮送到服務器,通過檢查響應客戶端。 –