Resetting the form
The <input> 's [Type] property value is "button" when it represents a normal button, which is equivalent to a <button> tag.
When the [Type] property value of <input> is "reset", it indicates that the form is reset and that it behaves as a button on the page, but when clicked on, it resets the form to the state when the page was just loaded.
Look at some code:
<!DOCTYPE HTML> <HTMLLang= "en"> <Head> <MetaCharSet= "UTF-8"> <Linkrel= "stylesheet"type= "Text/css"href= "Index.css"> <title>Form</title> </Head> <Body> <formAction="/"Method= "Get"> <H2>Input label--Reset form</H2> <P><label for= "Account">Account:</label><inputtype= "text"ID= "Account"/></P> <P><label for= "PSD">Password:</label><inputtype= "Password"ID= "PSD"/></P> <inputtype= "Reset"value= "Reset"> </form> </Body> </HTML>
More learning content, just in the code bud Net Http://www.mayacoder.com/lesson/index
The result is this:
After Reset:
HTML&CSS Basic Learning Note 1.26-input Reset form