diff options
Diffstat (limited to 'files/es/web/api/globaleventhandlers/onselect/index.html')
| -rw-r--r-- | files/es/web/api/globaleventhandlers/onselect/index.html | 74 |
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"><html> +<head> + +<title>onselect test</title> + +<style type="text/css"> +.text1 { border: 2px solid red; } +</style> + +<script type="text/javascript"> + +window.onselect = selectText; + +function selectText() +{ + alert("¡detectado evento select!"); +} +</script> +</head> + +<body> +<textarea class="text1" cols="30" rows="3"> +Resalte algo de este texto +con el puntero del ratón +para disparar el evento onselect. +</textarea> +</body> +</html> +</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> |
