如何在HTML表单中添加删除图标以文件上传
我开发了一个用于文件上传的表格。现在,我想添加一个删除图标以删除UI中的上传文件。请为我提供带有删除功能的解决方案。谢谢。
<div class="form-group row">
<label class="col-md-5 col-form-label">attachment</label>
<div class="col-md-7">
<input type="file" class="form-control" id="file" name="file"><br><br>
</div>
</div>
I developed a form for file uploading. now I want to add a remove icon to remove the uploaded file in UI. please provide me a solution with remove the function. Thank you.
<div class="form-group row">
<label class="col-md-5 col-form-label">attachment</label>
<div class="col-md-7">
<input type="file" class="form-control" id="file" name="file"><br><br>
</div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果使用Bootstrap 5:
添加文件bootstrap-icons.css
if using bootstrap 5 :
add file bootstrap-icons.css