How can I clear a form in HTML/JS without loading external libraries?
Here's what I've tried so far and how they fail:
<input type="reset" value="Reset">
This doesn't clear the form, only resets it to its original value.
form.getElementsByTagName('textarea').innerHTML = ''
This only clears the form if it has not been edited. If the form has been edited, it does nothing. Here's a JSfiddle where these 2 have been combined, but if you edit the textarea and click clear, you can see it doesn't work (source of JSfiddle).