aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/api/globaleventhandlers/onselect/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/es/web/api/globaleventhandlers/onselect/index.html')
-rw-r--r--files/es/web/api/globaleventhandlers/onselect/index.html74
1 files changed, 74 insertions, 0 deletions
diff --git a/files/es/web/api/globaleventhandlers/onselect/index.html b/files/es/web/api/globaleventhandlers/onselect/index.html
new file mode 100644
index 0000000000..a97e18c74a
--- /dev/null
+++ b/files/es/web/api/globaleventhandlers/onselect/index.html
@@ -0,0 +1,74 @@
+---
+title: GlobalEventHandlers.onselect
+slug: Web/API/GlobalEventHandlers/onselect
+translation_of: Web/API/GlobalEventHandlers/onselect
+---
+<div>
+<div>{{ ApiRef("HTML DOM") }}</div>
+
+<div>Un manejador de evento para el evento select en la ventana.</div>
+</div>
+
+<p> </p>
+
+<h2 id="Syntax" name="Syntax">Sintaxis</h2>
+
+<pre class="syntaxbox">window.onselect = <em>funcRef</em>;
+</pre>
+
+<ul>
+ <li><code>funcRef</code> es una función</li>
+</ul>
+
+<h2 id="Example" name="Example">Ejemplo</h2>
+
+<pre class="brush: html">&lt;html&gt;
+&lt;head&gt;
+
+&lt;title&gt;onselect test&lt;/title&gt;
+
+&lt;style type="text/css"&gt;
+.text1 { border: 2px solid red; }
+&lt;/style&gt;
+
+&lt;script type="text/javascript"&gt;
+
+window.onselect = selectText;
+
+function selectText()
+{
+ alert("¡detectado evento select!");
+}
+&lt;/script&gt;
+&lt;/head&gt;
+
+&lt;body&gt;
+&lt;textarea class="text1" cols="30" rows="3"&gt;
+Resalte algo de este texto
+con el puntero del ratón
+para disparar el evento onselect.
+&lt;/textarea&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+
+<h2 id="Notes" name="Notes">Notas</h2>
+
+<p>El evento select sólo se genera cuando es seleccionado texto dentro de un control de entrada (INPUT) de tipo text o textarea. El evento es disparado <em>después</em> de que el texto haya sido seleccionado.</p>
+
+<h2 id="Specification" name="Specification">Especificación</h2>
+
+<table class="spectable standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especifiación</th>
+ <th scope="col">Estado</th>
+ <th scope="col">Observaciones</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG','webappapis.html#handler-onselect','onselect')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>