how to reset form on click in js code example Example: reset form function javascript document.getElementById("form").reset();