1<!DOCTYPE html>
2<html>
3<body>
4
5<p>Enter some text in the fields below, then press the "Reset form" button to reset the form.</p>
6
7<form id="myForm">
8 First name: <input type="text" name="fname"><br>
9 Last name: <input type="text" name="lname"><br><br>
10 <input type="button" onclick="myFunction()" value="Reset form">
11</form>
12
13<script>
14function myFunction() {
15 document.getElementById("myForm").reset();
16}
17</script>
18
19</body>
20</html>
21