Bouton ouvrir et fermer

luks -  
Thamior Messages postés 267 Statut Membre -
Bonjour,

je cherche a créer un bouton qui :
1. ouvre une popup (ça je sas faire)
2. ferme la fenetre active ...
Configuration: Windows XP Internet Explorer 8.0

1 réponse

  1. Thamior Messages postés 267 Statut Membre 47
     
    Voici un exemple :

    Page.html

    <html>
    <head>
    <title>Test</title>
    <script>
    var newWin;
    function openWin() {
    this.newWin = window.open("wait.html","fenetre2","toolbar=yes,location=yes,menubar=no, height=402, width=359");
    }

    function closeWin() {
    this.newWin.close();
    }
    </script>
    </head>

    <body>
    <input type="button" onClick="javascript:openWin();" value="ouverture popup" />
    <input type="button" onClick="javascript:closeWin();" value="fermeture popup" />
    </html>

    wait.html

    <html>

    <head />

    <body>
    Changement en cours...
    </body>

    </html>
    0