Hello @kartik,
You need to wrap <input type = “file”> in to <form> tags and then you can reset input by resetting your form:
onClick="this.form.reset()"
Hope it helps!!
If not then its recommended to join our Java training class and learn about Java in detail.
Thank You!!