简单html文件上传带参数

html的代码如下

<form id="upload-form" action="http://localhost:9090/docs/uploadFile" method="post" enctype="multipart/form-data" >
   <input type="file" id="file" name="file" /> <br />
		<input type="string" id="id" name="id" /> <br />
   <input type="submit" value="Upload" />
</form>

http://localhost:9090/docs/uploadFile代表的是向后台发送请求的url
id是向后台发送上传请求带的参数,可以多个

猜你喜欢

转载自blog.csdn.net/weixin_44812604/article/details/128238914
今日推荐