In HTML, the reset method of Form is used to clear the user's input content. In the past, we mistakenly thought it was simply to empty the values in input items such as input.
But this is not the case. The essence of the reset method is to restore the content in input items such as input to the value in the attribute value, rather than the "" null value.
This is what w3c says:
Each time a <input type = "reset"> tag appears in an HTML form, a Reset object is created.
When the reset button is clicked, the values of all input elements in the form containing it are reset to their default values. The default value is specified by the HTML value Attribute or the defaultValue attribute of JavaScript.
In actual situations, we often need to implement form reset when editing a specific content. However, the value Attribute of input items such as input may have been assigned a value, therefore, reset only initializes the form to this value.
In this case, we can only use javascript to set the value attribute of input items such as input to null to achieve the reset effect.