Name
METHOD — NN all IE all HTML all
Synopsis
METHOD=get | post
Optional
Forms may be submitted via two possible HTTP methods:
get and post. These methods
determine whether the form element data is sent to the server
appended to the ACTION attribute URL
(get) or as a transaction message body
(post). In practice, when the
ACTION and METHOD attributes
are not assigned in a FORM element, the form
performs an unconditional reload of the same document, restoring form
controls to their default values.
Due to potential problems with internationalization, the
get method is deprecated in HTML 4.0. Because so
much of the World Wide Web depends on this method and
get is the default method on most browsers, the
get method is unlikely to go away for a long time.
Example
<FORM METHOD=POST ACTION="http://www@giantco.com/orders/order.html"> ... </FORM>
Value
Case-insensitive values of get or
post. These values do not have to be quoted.
Default
get
Object Model Reference
- NN
[window.]document.forms[i].method
[window.]document.formName.method
- IE
[window.]document.forms[i].method
[window.]document.formName.method
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access