我想發送document.getElementById('source').value
onsubmit。我怎麼發送?謝謝 這個值document.getElementById('source').value
工作正常。但是我想在提交時調用它。因爲有些時候用戶可以改變這個值。發送價值onsubmit
new AjaxUpload(btnUpload, {
action: 'upload-file.php?source='+document.getElementById('source').value+'&destination='+document.getElementById('destination').value+'&subjectarea='+document.getElementById('subjectarea').value+'&order_id='+document.getElementById('order_id').value,
name: 'uploadfile',
onSubmit: function(file, ext,source){
if (! (ext && /^(txt|pdf|doc|docx|pptx|ppt|xlsx|xls)$/.test(ext))){
// extension is not allowed
status.text('Only TXT, PDF, PPTX, PPT, XLS, XLSX, DOC or DOCX files are allowed');
return false;
}
;
status.text('Uploading...');
}