Gli ultimi tutorial di sviluppo web
 

Finestra blur() Method

<Window Object

Esempio

Assicurarsi che la nuova finestra non ottiene fuoco (inviare la nuova finestra per lo sfondo):

var myWindow = window.open("", "", "width=200, height=100");   // Opens a new window
myWindow.document.write("<p>A new window!</p>");      // Some text in the new window
myWindow.blur();                          // Assures that the new window does NOT get focus
Prova tu stesso "

Più "Try it Yourself" esempi di seguito.


Definizione e l'utilizzo

La blur() metodo rimuove attenzione dalla finestra corrente.

Suggerimento: utilizzare la focus() metodo per impostare lo stato attivo alla finestra corrente.

Nota: Questo metodo fa una richiesta per portare la finestra corrente allo sfondo. Potrebbe non funzionare come previsto in tutti i browser, a causa di diverse impostazioni utente.


Supporto browser

I numeri nella tabella indicano la prima versione del browser che supporta pienamente il metodo.

Metodo
blur()

Sintassi

window.blur()

parametri

Nessuna

Valore di ritorno

Nessun valore di ritorno

Esempi

Altri esempi

Esempio

Assicurarsi che la nuova finestra ottiene lo stato attivo (inviare la nuova finestra in primo piano):

var myWindow = window.open("", "", "width=200, height=100");   // Opens a new window
myWindow.document.write("<p>A new window!</p>");        // Some text in the new window
myWindow.focus();                                   // Assures that the new window gets focus
Prova tu stesso "

<Window Object