dimanche 21 juin 2020

Make web page which satisfy this condition? [closed]

  1. contains two buttons with labels "open window" and "close window", respectively
  2. open button opens a new window of webpage as many times as it is clicked
  3. close button closes the last open window whenever it is clicked
    var myWindow = null;
    function win_open() {
        myWindow = window.open("http://www.naver.com/");
    }

    function win_close() {
        if (myWindow != null) myWindow.close('open');
    }



Aucun commentaire:

Enregistrer un commentaire