Window blur()Método
Objeto Window
Definición y uso
El método blur() quita el foco del teclado de la ventana de nivel superior.
Sintaxis
window.blur()
Compatibilidad del navegador
![]()
![]()
![]()
![]()
![]()
Excepto el navegador Opera, todos los navegadores principales admiten el método blur().
Ejemplo
Ejemplo
Asegura que la nueva ventana no tenga el foco (la nueva ventana se envía al fondo):
<html>
<head>
<script>
function openWin()
{
myWindow=window.open('','','width=200,height=100');
myWindow.document.write("<p>The new window.</p>");
myWindow.blur();
}
</script>
</head>
<body>
<input type="button" value="Open window" onclick="openWin()">
</body>
</html>
<head>
<script>
function openWin()
{
myWindow=window.open('','','width=200,height=100');
myWindow.document.write("<p>The new window.</p>");
myWindow.blur();
}
</script>
</head>
<body>
<input type="button" value="Open window" onclick="openWin()">
</body>
</html>
Pruébalo »
Más ejemplos
Objeto Window Otras extensiones