我正在尝试用xmlhttprequest创建一个进度条,我想这是一个不使用表单的好方法,因为我需要xmlhttp.responseText。
为什么这个不起作用?
formdata = new FormData();
formdata.append("picture", document.getElementById('picture').files[0]);
formdata.append("APC_UPLOAD_PROGRESS", "2");
xmlhttp.open( "POST", 'upload.php', true );
xmlhttp.send(formdata);发布于 2012-05-04 15:59:41
你忘了引号:
替换
xmlhttp.open( "POST", upload.php, true );使用
xmlhttp.open("POST", 'upload.php', true);https://stackoverflow.com/questions/10436889
复制相似问题