Retourner au contenu associé (entrée de forum : javascript target et document)
Posté par Gyro Gearllose le 16 octobre 2004 à 12:08. En réponse au message javascript target et document. Évalué à 1.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# Ben, je ne vois pas où c'est difficile....
Posté par Gyro Gearllose . En réponse au message javascript target et document. Évalué à 1.
Dans un fichier html, j'ai ce code javascript qui ouvre 2 popups :
<html>
<head>
<script type="text/javascript">
w1 = window.open ('f1.html', 'f1', 'width=100,height=100');
w2 = window.open ('f2.html', 'f2', 'width=100,height=100');
</script>
</head>
<body>
</body>
</head>
Le code de f1.html :
<html>
<head>
<title>f1.html</title>
</head>
<body>
</body>
</html>
Enfin, le code de f2.html :
<html>
<head>
<title>f2.html</title>
<script type="text/javascript">
function changewindow (name)
{
window.opener.w1.document.write ('Texte créé depuis f2.html');
}
</script>
</head>
<body onload="changewindow('f1');">
</body>
</html>
Bons essayages et bon codage !