+ 3
//You can achieve by selecting input field by it's id and making it's value to null
document.getElementById("inp").value = ""
or you can make <form> Container and place button inside it and giving button a type="reset"
<button type="clear">Clear</button>
https://code.sololearn.com/WIlX1FKlvrpg/?ref=app
Note:I will delete this demo code in 24h , please copy if you need
+ 3
document.getElementById("inp").value = ""
+ 2
Taste đ but the form method is better i think !
<form action="mailto:email@email.com" onsubmit="this.submit(); this.reset(); return false;">
+ 1
There are Always a lot of solutions... That's a reason why programming is sooooo satisfying đ



