Latest web development tutorials

attribut parent de fenêtre

Fenêtre Object Reference objet Window

Définition et utilisation

propriété parent renvoie la fenêtre parent de la fenêtre actuelle.

grammaire

window.parent


support du navigateur

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Tous les principaux navigateurs prennent en charge les attributs parents


Exemples

Exemples

Lorsque vous ouvrez une nouvelle fenêtre, l'avertissement parent fenêtre pop-up:

<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Titre> Ce tutoriel (w3big.com) </ title>
</ Head>
<Head>
<Script>
fonctionner openwin () {
window.open ( '', '', 'width = 200, height = 100');
alerte (window.parent.location);
}
</ Script>
</ Head>
<Body>

<Type = valeur d'entrée "bouton" = "fenêtre ouverte" onclick = "openwin ()">

</ Body>
</ Html>

Essayez »


Fenêtre Object Reference objet Window