reset form onload javascript code example Example: reset form function javascript document.getElementById("form").reset();