<!DOCTYPE html>function formReset(){document.getElementById("frm1").reset();}Enter some text in the fields below, then press the "Reset form" button to reset the form.id="frm1"First name: type="text" name="fname"Last name: type="text" name="lname"type="button" onclick="formReset()" value="Reset form"