Latest web development tutorials

Nom de fenêtre attribut

Fenêtre Object Reference objet Window

Définition et utilisation

nommer des ensembles de propriétés ou retourne le nom de la fenêtre du magasin d'une chaîne.

grammaire

window.name


support du navigateur

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Tous les principaux navigateurs supportent nom d'attribut


Exemples

Exemples

Retourne le nom de la nouvelle fenêtre:

<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Titre> Ce tutoriel (w3big.com) </ title>
<Script>
myWindow var;
fonctionner openwin () {
myWindow = window.open ( '', 'MsgWindow', 'width = 200, height = 100');
myWindow.document.write ( "<p> nom de fenêtre:" + myWindow.name + "</ p>");
}
</ Script>
</ Head>
<Body>

<Input type = valeur "bouton" = "ouvrir ma fenêtre" onclick = "openwin ()" />

</ Body>
</ Html>

Essayez »


Fenêtre Object Reference objet Window