<script type="text/JavaScript">
function Test() {
var form = new FormData(document.getElementById("fileForm"));
$.ajax({
url: "/Ashx/ImportExcel.ashx ",
type: 'post',
data: form,
cache: false,
processData: false,
contentType: false,
success: function(data) {
alert(data);
}
});
}
</script>
<form id="fileForm" runat="server" action="/Ashx/ImportExcel.ashx" method="post" enctype="multipart/form-data">
<input name="imgFile" id="imgFile" type="file" />
<input type="button" value="图片上传" οnclick="Test();" >
</form>
</body>
图片上传
最新推荐文章于 2023-03-26 19:35:02 发布