var file = fileInput.files[0];var formData = new FormData();
formData.append('file', file);
var xhr = new XMLHttpRequest();
xhr.open('POST', 'url', true);
xhr.onload = function () {
if (xhr.status === 200) {
console.log('upload success');
}
};
xhr.send(formData);
老师帮我指点一下,这个红色的url部分
在普通的html界面该怎么填写?
服务端哪个地址接收数据的就填哪个,比如
httprequest事件
Select Case e.Path
Case "test.htm"
接收文件的代码
End Select
js
xhr.open('POST','http://www.abc.com/test.htm', true);