diff options
Diffstat (limited to 'files/es/web/api/globaleventhandlers/onsubmit/index.html')
-rw-r--r-- | files/es/web/api/globaleventhandlers/onsubmit/index.html | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/files/es/web/api/globaleventhandlers/onsubmit/index.html b/files/es/web/api/globaleventhandlers/onsubmit/index.html new file mode 100644 index 0000000000..948f7c9e57 --- /dev/null +++ b/files/es/web/api/globaleventhandlers/onsubmit/index.html @@ -0,0 +1,125 @@ +--- +title: GlobalEventHandlers.onsubmit +slug: Web/API/GlobalEventHandlers/onsubmit +translation_of: Web/API/GlobalEventHandlers/onsubmit +--- +<div>{{ApiRef("HTML DOM")}}</div> + +<p>Manejador de eventos del evento submit para el objeto window.</p> + +<h2 id="Sintaxis">Sintaxis</h2> + +<pre class="eval">window.onsubmit = <em>funcRef</em>; +</pre> + +<h3 id="Parametros">Parametros</h3> + +<ul> + <li><code>funcRef</code> es una referencia a una función.</li> +</ul> + +<h2 id="Ejemplo">Ejemplo</h2> + +<pre class="eval"><html> +<script> +function reg() { + window.captureEvents(Event.SUBMIT); + window.onsubmit = hit; +} + +function hit() { + console.log('hit'); +} +</script> + +<body onload="reg();"> +<form> + <input type="submit" value="submit" /> +</form> +<div id="d"> </div> +</body> +</html> +</pre> + +<h2 id="Notas">Notas</h2> + +<p>El evento submit se genera cuando el usuario hace click en el boton submit en un formulario (<code><input type="submit"/></code>).</p> + +<p>El evento submit no se genera cuando el usuario llama a la función <code>form.submit()</code> directamente.</p> + +<h2 id="Especificaciones">Especificaciones</h2> + +<table class="spectable standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('HTML WHATWG','webappapis.html#handler-onsubmit','onsubmit')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="Browser_Compatibility">Browser Compatibility</h2> + +<div>{{CompatibilityTable}}</div> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Edge</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>{{CompatVersionUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Android Webview</th> + <th>Chrome for Android</th> + <th>Edge</th> + <th>Firefox Mobile (Gecko)</th> + <th>Firefox OS</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> |