急!急!!!期末大作业

m0_51029646 2020-12-15 04:22:34
怎么用javascript做一个简单的可以上传作业的网页?完整代码
...全文
5395 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ludousha 2020-12-17
  • 打赏
  • 举报
回复
同上,form表单提交,很直接
weixin_50944805 2020-12-15
  • 打赏
  • 举报
回复
作业是怎么样的,文字还是文件。 只用html就能实现,使用form表单的提交


<form action="http://localhost:8080/user" method="post"> /*http://localhost:8080/user : 要提交到的服务器地址,post:提交方式(post,get)*/

	作业1,文字类:<input type="text" name="text1" /><br> /*文字类型,name="text1" 后台获取值的名称*/
	
	作业2,文件类:<input type="file" name="file1" /> <br> /*文件类型,选择文件,name="file1" 后台获取值的名称*/
	
	<input type="submit" value="提交"> /*点击提交*/

</form>

87,987

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧