form
element represents a document section containing interactive controls for
submitting information
form
element represents a document section containing interactive controls for
submitting information
action
formaction
attribute on elements
button
<input type="submit">
<input type="image">
method="dialog"
is set
event.preventDefault()
method
post
get
(default) ?
separator
dialog
dialog
, closes the
dialog
and causes a submit
event to
be fired on submission,
without submitting data or clearing the form
put
is
not
allowed in a html form (see here)
formmethod
attributes on elements
button
<input type="submit">
<input type="image">
autocomplete
on
off
autocomplete="on"
target
name/keyword
for a browsing context
(for example,
tab, window, or
iframe)_self
(default): Load into the same browsing context as the
current one.
_blank
: Load into a new unnamed browsing context. This
provides the same behavior as
setting rel="noopener"
which does
not set window.opener
_parent
: Load into the parent browsing context of the
current one. If no parent, behaves the same as _self
.
_top
: Load into the top-level browsing context (i.e., the
browsing
context that is an
ancestor of the current one and
has no parent). If no parent, behaves the same as _self
.
rel
external
nofollow
opener
noopener
window.opener
were null
target="_parent"
were setopener
target=”_blank”
attribute have a potential security
vulnerability
noopener
attribute breaks the connection
between the new tab and the referrer pagenoreferrer
referrer
unknownnoopener
also set
help
prev
next
search
license
rel
value is a space-separated list of
these enumerated values
enctype
post
, enctype
is the MIME type of the
form submission
application/x-www-form-urlencoded
(default)
application/x-www-form-urlencoded
, the
body of the HTTP
message sent to the server is essentially one giant query string
-- name/value pairs are separated by the ampersand (&), and
names are separated from values by the equals symbol (=)
MyVariabeOne=ValueOne&MyVariableTwo=ValueTwo
multipart/form-data
type=file
text/plain
formenctype
attributes on
<a href="./expt.html" target="_blank" rel="opener">click here</a>
// from console of target page window.opener.origin "http://127.0.0.1:5500"