function uploadfile(){
var formdata = new formdata();
var files = document.getelementbyid('file').files;
var file = files[0];
formdata.append('file',file);
var xhr = new xmlhttprequest();
xhr.open('post','index.html',true);
xhr.onload = function(e){
if(this.status == 200){
document.getelementbyid(resulte).innerhtml = this.response;
}
};
xhr.send(formdata);
}