I'm making a calculator and I can't get my clear button to work in order to clear the form field.
The rest of the calculator works just fine, just the clear button is having issues. I've even tried setting the value itself to a number or string and that has no effect either.
Here's the code:
function clear() {
document.form.textview.value = '';
}
<form class="form" name="form">
<input class="textview" name="textview" placeholder="0">
</form>
<input class="button CE-button" type="button" value="CE" onclick="clear()">