aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/htmlformelement/submit/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/ru/web/api/htmlformelement/submit/index.html
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/ru/web/api/htmlformelement/submit/index.html')
-rw-r--r--files/ru/web/api/htmlformelement/submit/index.html56
1 files changed, 56 insertions, 0 deletions
diff --git a/files/ru/web/api/htmlformelement/submit/index.html b/files/ru/web/api/htmlformelement/submit/index.html
new file mode 100644
index 0000000000..4df609cd44
--- /dev/null
+++ b/files/ru/web/api/htmlformelement/submit/index.html
@@ -0,0 +1,56 @@
+---
+title: HTMLFormElement.submit()
+slug: Web/API/HTMLFormElement/submit
+tags:
+ - HTMLFormElement
+translation_of: Web/API/HTMLFormElement/submit
+---
+<div>{{APIRef("HTML DOM")}}</div>
+
+<p>Метод <strong><code>HTMLFormElement.submit()</code></strong> позволяет отправить форму {{HtmlElement("form")}}.</p>
+
+<p>Этот метод похож, но не идентичен кнопке {{HtmlElement("button")}}. , который активирует отправку формы.   Однако при непосредственном вызове этого метода:</p>
+
+<ul>
+ <li>Событие {{event("submit")}} не инициировано. В частности, обработчик события {{domxref("GlobalEventHandlers.onsubmit", "onsubmit")}} для данной формы не запускается.</li>
+ <li><a href="/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation">Проверка ограничений</a> не запускается.</li>
+</ul>
+
+<p>Метод {{domxref("HTMLFormElement.requestSubmit()")}} идентичен кнопке {{HtmlElement("button")}} , которая активирует отправку формы и не имеет различий, указанных выше.</p>
+
+<p>Если элемент управления формы (например, кнопка отправки) имеет <code>name</code> или <code>id</code> кнопки <code>submit</code>, тогда этот метод будет маскировать метод <code>submit</code> формы..</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><em>HTMLFormElement</em>.submit()
+</pre>
+
+<h2 id="Example">Example</h2>
+
+<pre class="brush: js">document.forms["myform"].submit();
+</pre>
+
+<h2 id="Specification" name="Specification">Specifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', '#dom-form-submit', 'HTMLFormElement: submit')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.HTMLFormElement.submit")}}</p>