0👍
You can do something like that just a simple function to clear your textarea
and in case of you’re using vuejs
instead of document.querySelector
and document.getElementById
use
calling this function after your submission works too.
const textarea = document.querySelector("#description");
document.getElementById("#btn").addEventListener("click", function() {
textarea.innerHTML = "";
})
<textarea class="form-control" name="description" id="description">hello</textarea>
<button id="#btn">clear</button>
- [Vuejs]-VueJS: Setting img src links for dev mode and production mode
- [Vuejs]-How to make the data values in vue v-simple-table add up to average?
Source:stackexchange.com