Home > Article > Web Front-end > The difference between BUTTON and INPUT_Experience exchange
Summary theme in one sentence: Has the same effect as
but is more powerful in terms of maneuverability.
Forms part of HTML 4.01 specificationThe named form has the following control types: buttons, checkboxes, radio buttons, menus, text input, file select, hidden controls, object controls . Except for buttons/menus/object controls, they are all completed by .
What I’m talking about here are and
.
and
Specified in the specification: You can use and
to make form buttons. Please refer to the detailed definitions of these elements for different button types. It should be noted that
supports richer presentation functions than
.
Everyone knows that can be used like this (actually it must be used like this):
, it must be closed like this. Instead of:
. Because the starting tag is and must be , while the closing tag is and is prohibited.
What’s more powerful than
is that it can contain content. Its value is not written in the
value
attribute, but included in the tag. For example: . The opening tag and closing tag of
are both required. This way you gain control over styling.
You can write like this: , or even insert a picture:
. Somewhat similar to
, but obviously much more powerful.
The last thing to note is that the images included in cannot use hotspot maps, that is,
, this is illegal. Of course, it cannot contain items such as input
, select
, textarea
, label
, button
, form
, fieldset
, iframe
, and isindex
(deprecated) elements are gone.