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 >
<label >attachment</label>
<div >
<input type="file" id="file" name="file"><br><br>
</div>
</div>
CodePudding user response:
if using bootstrap 5 :
add file bootstrap-icons.css
<div >
<label >attachment</label>
<input type="file" id="file" name="file" />
<button type="button"><i ></i></button>
</div>