[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/HTML/Reference/Elements/form#method [Back]  [Original]

<form> - HTML: Hypertext Markup Language | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

<form>

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.

HTML <form> .

In this article

<form action="" method="get" class="form-example">
  <div class="form-example">
    <label for="name">Enter your name: </label>
    <input type="text" name="name" id="name" required />
  </div>
  <div class="form-example">
    <label for="email">Enter your email: </label>
    <input type="email" name="email" id="email" required />
  </div>
  <div class="form-example">
    <input type="submit" value="Subscribe!" />
  </div>
</form>
form.form-example {
  display: table;
}

div.form-example {
  display: table-row;
}

label,
input {
  display: table-cell;
  margin-bottom: 10px;
}

label {
  padding-right: 10px;
}

<form> , elements CSS :valid :invalid .

, .
<form> .
, .
.
ARIA group, presentation
DOM HTMLFormElement

.

accept

A comma-separated list of content types that the server accepts.

: : HTML5 . , <input> accept .

accept-charset

, . . .

action

URI. <button>, <input type="submit">, <input type="image"> formaction .

autocapitalize

. iOS Safari . autocapitalize <form> .

  • none: .
  • sentences: . .
  • words: .
  • characters: .
autocomplete

. autocomplete <form> .

  • off: . ( )
  • on: .
enctype

method post , enctype MIME .

  • application/x-www-form-urlencoded: .
  • multipart/form-data: <input type="file"> .
  • text/plain: HTML 5 .

<button>, <input type="submit">, <input type="image"> formenctype .

method

HTTP .

<button>, <input type="submit">, <input type="image"> formmethod .

name

. HTML 4 . id .

novalidate

. novalidate ( ) <button>, <input type="submit">, <input type="image"> formnovalidate .

target

. (, , <iframe>) . , target . .

  • _self: . .
  • _blank: . , .
  • _parent: . _self .
  • _top: ( , ) . _self .

<button>, <input type="submit">, <input type="image"> formtarget .

html
<!-- Form which will send a GET request to the current URL -->
<form>
  <label
    >Name:
    <input name="submitted-name" autocomplete="name" />
  </label>
  <button>Save</button>
</form>

<!-- Form which will send a POST request to the current URL -->
<form method="post">
  <label
    >Name:
    <input name="submitted-name" autocomplete="name" />
  </label>
  <button>Save</button>
</form>

<!-- Form with fieldset, legend, and label -->
<form method="post">
  <fieldset>
    <legend>Title</legend>
    <label><input type="radio" name="radio" /> Select me</label>
  </fieldset>
</form>

Specification
HTML
# the-form-element


Web Proxy Viewer  |  New URL  |  Original Page