clearing a form js code example Example: reset form function javascript document.getElementById("form").reset();