-
Notifications
You must be signed in to change notification settings - Fork 8k
/
index.md
52 lines (36 loc) · 931 Bytes
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
title: GlobalEventHandlers.onresize
slug: Web/API/Window/resize_event
---
{{ ApiRef() }}
La propiedad **GlobalEventHandlers.onresize** contiene un [`event handler`](/es/docs/Web/Reference/Events/Event_handlers) desencadenado cuando un evento [`resize`](/es/docs/Web/Reference/Events/resize) es recibido.
## Sintaxis
```js
window.onresize = funcRef;
```
### Parametros
- `funcRef` es una referencia a una función.
## Ejemplo
```js
window.onresize = doFunc;
```
```html
<html>
<head>
<title>onresize test</title>
<script type="text/javascript">
window.onresize = resize;
function resize() {
alert("resize event detected!");
}
</script>
</head>
<body>
<p>Resize the browser window to fire the resize event.</p>
</body>
</html>
```
## Notas
El evento **resize** es activado después de que la ventana ha sido redimensionada.
## Especificaciones
{{Specifications}}