Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1116137 of HTMLFormElement

  • Revision slug: Web/API/HTMLFormElement
  • Revision title: HTMLFormElement
  • Revision id: 1116137
  • Created:
  • Creator: shtarbanov
  • Is current revision? No
  • Comment

Revision Content

{{APIRef("HTML DOM")}}

INHERITANCE CHAIN:   {{domxref("Node")}}  <==  {{domxref("Element")}}<==  {{domxref("HTMLElement")}}  <==  {{domxref("HTMLFormElement")}}

The HTMLFormElement interface provides methods to create and modify {{HTMLElement("form")}} elements.

 Properties

elements {{readonlyinline}} Returns a live {{domxref("HTMLFormControlsCollection")}} containing all the form controls belonging to this form element.
length {{readonlyinline}} Returns a long that represents the number of controls in the form.
name Returns / Sets as a string the value of the form's {{ htmlattrxref("name", "form") }} HTML attribute, containing the name of the form.
method Returns / Sets as a string the value of the form's {{ htmlattrxref("method", "form") }} HTML attribute, indicating the HTTP method used to submit the form. Only specified values can be set.
target Returns / Sets as a string the value of the form's {{ htmlattrxref("target", "form") }} HTML attribute, indicating where to display the results received from submitting the form.
action Returns / Sets as a string the value of the form's {{ htmlattrxref("action", "form") }} HTML attribute, containing the URI of a program that processes the information submitted by the form.

encoding OR enctype

Returns / Sets as a string the value of the form's {{ htmlattrxref("enctype", "form") }} HTML attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two methods are synonyms.
acceptCharset Returns / Sets as a string the value of the form's {{ htmlattrxref("accept-charset", "form") }} HTML attribute, representing the character encoding that the server accepts.
autocomplete Returns / Sets as a string the value of the form's {{ htmlattrxref("autocomplete", "form") }} HTML attribute, indicating whether the controls in this form can have their values automatically populated by the browser.
noValidate Returns / Sets as a boolean the value of the form's  {{ htmlattrxref("novalidate", "form") }} HTML attribute, indicating whether the form should not be validated.

Methods

Inherits methods from its parent, {{domxref("HTMLElement")}}.

submit() Submits the form to the server.
reset() Resets the form to its initial state.
operator['name'] Returns the forms with the specified name or id argument; returns null if no items match. Instead of this method, use the shortcut: .forms['name'] or .forms['id']
operator[index] Returns the form at the specified index; returns null if no item at that index. Instead of this method, use the shortcut: .forms[index]
checkValidity() Returns true if the element's child controls are subject to constraint validation and satisfy those contraints; returns false if some controls do not satisfy their constraints. Fires an event named {{event("invalid")}} at any control that does not satisfy its constraints; such controls are considered invalid if the event is not canceled. It is up to the programmer to decide how to respond to false.
HTMLFormElement.reportValidity() Returns true if the element's child controls satisfy their validation constraints. When false is returned, cancelable invalid events are fired for each invalid child and validation problems are reported to the user.
requestAutocomplete() Triggers a native browser interface to assist the user in completing the fields which have an autofill field name value that is not off or on. The form will receive an event once the user has finished with the interface, the event will either be {{event("autocomplete")}} when the fields have been filled or {{event("autocompleteerror")}} when there was a problem.

See also:

HTMLTextAreaElement

Examples

Create a new form element, modify its attributes and submit it:

var f = document.createElement("form");// Create a form
document.body.appendChild(f);          // Add it to the document body
f.action = "/cgi-bin/some.cgi";        // Add action and method attributes
f.method = "POST"
f.submit();                            // Call the form's submit method

Extract information from a form element and set some of its attributes:

<form name="formA" id="formA" action="/cgi-bin/test" method="POST">
 <p>Click "Info" for form details; "Set" to change settings.</p>
 <p>
  <input type="button" value="info" onclick="getFormInfo();">
  <input type="button" value="set"  onclick="setFormInfo(this.form);">
  <input type="reset" value="reset"><br>
  <textarea id="tex" style="height:15em; width:20em"></textarea>
 </p>
</form>

<script type="text/javascript">
  function getFormInfo(){
    var info;
    var f = document.forms["formA"]; //Get a reference to the form via id.
    info = "elements: " + f.elements     + "\n"
         + "length: "   + f.length       + "\n"
         + "name: "     + f.name         + "\n"
         + "charset: "  + f.acceptCharset+ "\n"
         + "action: "   + f.action       + "\n"
         + "enctype: "  + f.enctype      + "\n"
         + "encoding: " + f.encoding     + "\n"
         + "method: "   + f.method       + "\n"
         + "target: "   + f.target;
    document.forms["formA"].elements['tex'].value = info;
  }
  function setFormInfo(f){ //Argument is a reference to the form.
    f.method = "GET";
    f.action = "/cgi-bin/evil_executable.cgi";
    f.name   = "totally_new";
  }
</script>

Submit a form in a popup window:

<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>MDN Example</title>
<script type="text/javascript">
function popupSend (oFormElement) {
  if (oFormElement.method && oFormElement.method.toLowerCase() !== "get") {
    alert("This script supports the GET method only.");
    return;
  }
  var oField, sFieldType, nFile, sSearch = "";
  for (var nItem = 0; nItem < oFormElement.elements.length; nItem++) {
    oField = oFormElement.elements[nItem];
    if (!oField.hasAttribute("name")) { continue; }
    sFieldType = oField.nodeName.toUpperCase() === "INPUT" ? oField.getAttribute("type").toUpperCase() : "TEXT";
    if (sFieldType === "FILE") {
      for (nFile = 0; nFile < oField.files.length; sSearch += "&" + escape(oField.name) + "=" + escape(oField.files[nFile++].name));
    } else if ((sFieldType !== "RADIO" && sFieldType !== "CHECKBOX") || oField.checked) {
      sSearch += "&" + escape(oField.name) + "=" + escape(oField.value);
    }
  }
  open(oFormElement.action.replace(/(?:\?.*)?$/, sSearch.replace(/^&/, "?")), "submit-" + (oFormElement.name || Math.floor(Math.random() * 1e6)), "resizable=yes,scrollbars=yes,status=yes");
}
</script>

</head>
 
<body>

<form name="yourForm" action="test.php" method="get" onsubmit="popupSend(this); return false;">
  <p>First name: <input type="text" name="firstname" /><br />
  Last name: <input type="text" name="lastname" /><br />
  Password: <input type="password" name="pwd" /><br />
  <input type="radio" name="sex" value="male" /> Male <input type="radio" name="sex" value="female" /> Female</p>
  <p><input type="checkbox" name="vehicle" value="Bike" />I have a bike<br />
  <input type="checkbox" name="vehicle" value="Car" />I have a car</p>
  <p><input type="submit" value="Submit" /></p>
</form>

</body>
</html>

Submitting forms and uploading files using XMLHttpRequest

If you want to know how to serialize and submit a form using the XMLHttpRequest API, please read this paragraph.

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', "forms.html#the-form-element", "HTMLFormElement")}} {{Spec2('HTML WHATWG')}}

The following method has been added: requestAutocomplete().

{{SpecName('HTML5 W3C', "forms.html#the-form-element", "HTMLFormElement")}} {{Spec2('HTML5 W3C')}} The elements properties returns an {{domxref("HTMLFormControlsCollection")}} instead of a raw {{domxref("HTMLCollection")}}. This is mainly a technical change. The following method has been added: checkValidity(). The following properties have been added: autocomplete, noValidate, and encoding.
{{SpecName('DOM2 HTML', 'html.html#ID-40002357', 'HTMLFormElement')}} {{Spec2('DOM2 HTML')}} No change from {{SpecName("DOM1")}}.
{{SpecName('DOM1', 'level-one-html.html#ID-40002357', 'HTMLFormElement')}} {{Spec2('DOM1')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}} {{CompatGeckoDesktop(1.0)}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatGeckoMobile(1.0)}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

See also

  • The HTML element implementing this interface: {{ HTMLElement("form") }}.

Revision Source

<div>{{APIRef("HTML DOM")}}</div>

<div class="note">
<p><em>INHERITANCE CHAIN: &nbsp; {{domxref("Node")}}&nbsp; &lt;==&nbsp; {{domxref("Element")}}&lt;==&nbsp; {{domxref("HTMLElement")}}&nbsp; &lt;==&nbsp; {{domxref("HTMLFormElement")}}</em></p>
</div>

<p id="Properties">The <strong><code>HTMLFormElement</code></strong> interface provides methods to create and modify {{HTMLElement("form")}} elements.</p>

<h2 id="Properties_2">&nbsp;Properties</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/elements">elements </a>{{readonlyinline}}</td>
   <td>Returns a live {{domxref("HTMLFormControlsCollection")}} containing all the form controls belonging to this form element.</td>
  </tr>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/length">length</a> {{readonlyinline}}</td>
   <td>Returns a <code>long</code> that represents the number of controls in the form.</td>
  </tr>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/name">name</a></td>
   <td>Returns / Sets as a string the value of the form's {{ htmlattrxref("name", "form") }}&nbsp;HTML&nbsp;attribute, containing the name of the form.</td>
  </tr>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/method">method</a></td>
   <td>Returns / Sets as a string the value of the form's {{ htmlattrxref("method", "form") }}&nbsp;HTML&nbsp;attribute, indicating the HTTP&nbsp;method used to submit the form. Only specified values can be set.</td>
  </tr>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/target">target</a></td>
   <td>Returns / Sets as a string the value of the form's {{ htmlattrxref("target", "form") }} HTML attribute, indicating where to display the results received from submitting the form.</td>
  </tr>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/action">action</a></td>
   <td>Returns / Sets as a string the value of the form's {{ htmlattrxref("action", "form") }} HTML attribute, containing the URI&nbsp;of a program that processes the information submitted by the form.</td>
  </tr>
  <tr>
   <td>
    <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/encoding">encoding </a>OR <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/enctype">enctype</a></p>
   </td>
   <td>Returns / Sets as a string the value of the form's {{ htmlattrxref("enctype", "form") }}&nbsp;HTML&nbsp;attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two methods are synonyms.</td>
  </tr>
  <tr>
   <td><a href="/en-US/docs/Web/API/HTMLFormElement/acceptCharset">acceptCharset</a></td>
   <td>Returns / Sets as a string the value of the form's {{ htmlattrxref("accept-charset", "form") }}&nbsp;HTML&nbsp;attribute, representing the character encoding that the server accepts.</td>
  </tr>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/autoComplete">autocomplete</a></td>
   <td>Returns / Sets as a string the value of the form's {{ htmlattrxref("autocomplete", "form") }} HTML&nbsp;attribute, indicating whether the controls in this form can have their values automatically populated by the browser.</td>
  </tr>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/noValidate">noValidate</a></td>
   <td>Returns / Sets as a boolean the value of the form's &nbsp;{{ htmlattrxref("novalidate", "form") }} HTML attribute, indicating whether the form should not be validated.</td>
  </tr>
 </tbody>
</table>

<dl>
</dl>

<h2 id="Methods">Methods</h2>

<p><em>Inherits methods from its parent, {{domxref("HTMLElement")}}</em><em>.</em></p>

<table class="standard-table">
 <tbody>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit">submit()</a></td>
   <td>Submits the form to the server.</td>
  </tr>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reset">reset()</a></td>
   <td>Resets the form to its initial state.</td>
  </tr>
  <tr>
   <td>operator['name']</td>
   <td>Returns the forms <code>with the specified name</code> or <code>id</code> argument; returns null if no items match. Instead of this method, use the shortcut: <code>.forms['name'] or .forms['id']</code></td>
  </tr>
  <tr>
   <td>operator[index]</td>
   <td>Returns the form at the specified <em>index</em>; returns null if no item at that index. Instead of this method, use the shortcut: <code>.forms[index]</code></td>
  </tr>
  <tr>
   <td>checkValidity()</td>
   <td>Returns <code>true</code> if the element's child controls are subject to constraint validation and satisfy those contraints; returns<span style="line-height:1.5"> </span><code style="font-style: normal; line-height: 1.5;">false</code><span style="line-height:1.5"> if some controls do not satisfy their constraints. Fires an event named {{event("invalid")}} at any control that does not satisfy its constraints; such controls are considered invalid if the event is not canceled. It is up to the programmer to decide how to respond to <code style="font-style: normal; line-height: 1.5;">false</code>.</span></td>
  </tr>
  <tr>
   <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reportValidity">HTMLFormElement.reportValidity()</a></td>
   <td>Returns<span style="line-height:1.5">&nbsp;</span><code style="font-style: normal; line-height: 1.5;">true</code><span style="line-height:1.5">&nbsp;if the element's child controls satisfy their validation constraints.&nbsp;</span><span style="line-height:1.5">When</span><span style="line-height:1.5">&nbsp;</span><code style="font-style: normal; line-height: 1.5;">false</code><span style="line-height:1.5">&nbsp;is returned, cancelable</span><span style="line-height:1.5">&nbsp;<code><a href="https://developer.mozilla.org/en-US/docs/Web/Events/invalid" title="/en-US/docs/Web/Events/invalid">invalid</a></code>&nbsp;events are fired for each invalid child and validation problems are reported to the user.</span></td>
  </tr>
  <tr>
   <td>requestAutocomplete()</td>
   <td>Triggers a native browser interface to assist the user in completing the fields which have an <a href="https://html.spec.whatwg.org/#autofill-field-name">autofill field name</a> value that is not <code>off</code> or <code>on</code>. The form will receive an event once the user has finished with the interface, the event will either be&nbsp;<span style="line-height:1.5">{{event("autocomplete")}}</span> when the fields have been filled or <span style="line-height:1.5">{{event("autocompleteerror")}}</span> when there was a problem.</td>
  </tr>
 </tbody>
</table>

<p>See also:</p>

<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement">HTMLTextAreaElement</a></p>

<h2 id="Examples">Examples</h2>

<p>Create a new form element, modify its attributes and submit it:</p>

<pre class="brush: js">
var f = document.createElement("form");// Create a form
document.body.appendChild(f);          // Add it to the document body
f.action = "/cgi-bin/some.cgi";        // Add action and method attributes
f.method = "POST"
f.submit();                            // Call the form's submit method
</pre>

<p>Extract information from a form element and set some of its attributes:</p>

<pre class="brush: html">
&lt;form name="formA" id="formA" action="/cgi-bin/test" method="POST"&gt;
 &lt;p&gt;Click "Info" for form details; "Set" to change settings.&lt;/p&gt;
 &lt;p&gt;
  &lt;input type="button" value="info" onclick="getFormInfo();"&gt;
  &lt;input type="button" value="set"  onclick="setFormInfo(this.form);"&gt;
  &lt;input type="reset" value="reset"&gt;&lt;br&gt;
  &lt;textarea id="tex" style="height:15em; width:20em"&gt;&lt;/textarea&gt;
 &lt;/p&gt;
&lt;/form&gt;

&lt;script type="text/javascript"&gt;
  function getFormInfo(){
    var info;
    var f = document.forms["formA"]; //Get a reference to the form via id.
    info = "elements: " + f.elements     + "\n"
         + "length: "   + f.length       + "\n"
         + "name: "     + f.name         + "\n"
         + "charset: "  + f.acceptCharset+ "\n"
         + "action: "   + f.action       + "\n"
         + "enctype: "  + f.enctype      + "\n"
         + "encoding: " + f.encoding     + "\n"
         + "method: "   + f.method       + "\n"
         + "target: "   + f.target;
    document.forms["formA"].elements['tex'].value = info;
  }
  function setFormInfo(f){ //Argument is a reference to the form.
    f.method = "GET";
    f.action = "/cgi-bin/evil_executable.cgi";
    f.name   = "totally_new";
  }
&lt;/script&gt;
</pre>

<p>Submit a form in a <a href="/en-US/docs/DOM/window.open" title="/en-US/docs/DOM/window.open">popup window</a>:</p>

<pre class="brush: html">
&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
&lt;title&gt;MDN Example&lt;/title&gt;
&lt;script type="text/javascript"&gt;
function popupSend (oFormElement) {
&nbsp; if (oFormElement.method &amp;&amp; oFormElement.method.toLowerCase() !== "get") {
&nbsp;&nbsp;&nbsp; alert("This script supports the GET method only.");
&nbsp;&nbsp;&nbsp; return;
&nbsp; }
&nbsp; var oField, sFieldType, nFile, sSearch = "";
&nbsp; for (var nItem = 0; nItem &lt; oFormElement.elements.length; nItem++) {
&nbsp;&nbsp;&nbsp; oField = oFormElement.elements[nItem];
&nbsp;&nbsp;&nbsp; if (!oField.hasAttribute("name")) { continue; }
&nbsp;&nbsp;&nbsp; sFieldType = oField.nodeName.toUpperCase() === "INPUT" ? oField.getAttribute("type").toUpperCase() : "TEXT";
&nbsp;&nbsp;&nbsp; if (sFieldType === "FILE") {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (nFile = 0; nFile &lt; oField.files.length; sSearch += "&amp;" + escape(oField.name) + "=" + escape(oField.files[nFile++].name));
&nbsp;&nbsp;&nbsp; } else if ((sFieldType !== "RADIO" &amp;&amp; sFieldType !== "CHECKBOX") || oField.checked) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sSearch += "&amp;" + escape(oField.name) + "=" + escape(oField.value);
&nbsp;&nbsp;&nbsp; }
&nbsp; }
&nbsp; open(oFormElement.action.replace(/(?:\?.*)?$/, sSearch.replace(/^&amp;/, "?")), "submit-" + (oFormElement.name || Math.floor(Math.random() * 1e6)), "resizable=yes,scrollbars=yes,status=yes");
}
&lt;/script&gt;

&lt;/head&gt;
&nbsp;
&lt;body&gt;

&lt;form name="yourForm" action="test.php" method="get" onsubmit="popupSend(this); return false;"&gt;
&nbsp; &lt;p&gt;First name: &lt;input type="text" name="firstname" /&gt;&lt;br /&gt;
&nbsp; Last name: &lt;input type="text" name="lastname" /&gt;&lt;br /&gt;
&nbsp; Password: &lt;input type="password" name="pwd" /&gt;&lt;br /&gt;
&nbsp; &lt;input type="radio" name="sex" value="male" /&gt; Male &lt;input type="radio" name="sex" value="female" /&gt; Female&lt;/p&gt;
&nbsp; &lt;p&gt;&lt;input type="checkbox" name="vehicle" value="Bike" /&gt;I have a bike&lt;br /&gt;
&nbsp; &lt;input type="checkbox" name="vehicle" value="Car" /&gt;I have a car&lt;/p&gt;
&nbsp; &lt;p&gt;&lt;input type="submit" value="Submit" /&gt;&lt;/p&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>

<h3 id="Submitting_forms_and_uploading_files_using_XMLHttpRequest">Submitting forms and uploading files using <code>XMLHttpRequest</code></h3>

<p>If you want to know how to serialize and submit a form using the <a href="/en-US/docs/DOM/XMLHttpRequest" title="/en-US/docs/DOM/XMLHttpRequest"><code>XMLHttpRequest</code></a> API, please read <a href="/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest#Submitting_forms_and_uploading_files" title="/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest#Submitting_forms_and_uploading_files">this paragraph</a>.</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table" style="font-size:80%">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('HTML WHATWG', "forms.html#the-form-element", "HTMLFormElement")}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>
    <p>The following method has been added: <code>requestAutocomplete()</code>.</p>
   </td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', "forms.html#the-form-element", "HTMLFormElement")}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>The elements properties returns an {{domxref("HTMLFormControlsCollection")}} instead of a raw {{domxref("HTMLCollection")}}. This is mainly a technical change. The following method has been added: <code>checkValidity()</code>. The following properties have been added: <code>autocomplete</code>, <code>noValidate</code>, and <code>encoding</code>.</td>
  </tr>
  <tr>
   <td>{{SpecName('DOM2 HTML', 'html.html#ID-40002357', 'HTMLFormElement')}}</td>
   <td>{{Spec2('DOM2 HTML')}}</td>
   <td>No change from {{SpecName("DOM1")}}.</td>
  </tr>
  <tr>
   <td>{{SpecName('DOM1', 'level-one-html.html#ID-40002357', 'HTMLFormElement')}}</td>
   <td>{{Spec2('DOM1')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table" style="font-size:80%">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoDesktop(1.0)}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoMobile(1.0)}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li>The HTML element implementing this interface: {{ HTMLElement("form") }}.</li>
</ul>
Revert to this revision