Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
1631694849033-194137.html 1006 Bytes
Copy Edit Raw Blame History
wow-karala authored 2021-09-22 15:40 . --
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width= device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div>
<input type = "file" name = "file" onchange = "uploadFile(this);">
<input type = "file" name = "2file" onchange = "uploadFile(this);">
</div>
<div>
<pre id = "ret-content"></pre>
</div>
<script>
function uploadFile(t){
if(t.files.length<=0) return;
let fm = new FormData();
fm.append('file',t.files[0]);
fetch('/upload',{
method:'POST',
body:fm
})
.then(res=>{
return res.text();
})
.then(text=>{
document.getElementById('ret-content').innerHTML = text;
})
}
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化