+ 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
14th Mar 2020, 3:11 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 3
document.getElementById("inp").value = ""
14th Mar 2020, 3:12 PM
Taste
Taste - avatar
+ 2
Taste 👍 but the form method is better i think ! <form action="mailto:email@email.com" onsubmit="this.submit(); this.reset(); return false;">
14th Mar 2020, 3:20 PM
Jean_Mionnet
Jean_Mionnet - avatar
+ 1
There are Always a lot of solutions... That's a reason why programming is sooooo satisfying 😃
14th Mar 2020, 3:24 PM
Jean_Mionnet
Jean_Mionnet - avatar