document.getElementById("form").reset();
document.querySelector("form").reset();
<form id='myform'> ... </form> const submitForm = () => { ...some API call document.getElementById("myform").reset(); }