Answers for "how to close a window using a button is js"

12

html close window button

<button type="button" onclick="javascript:window.close()"> Name </button>
Posted by: Guest on November-16-2020
0

window close function in javascript

var win = window.open("http://www.google.com");

var winClosed = setInterval(function () {

    if (win.closed) {
        clearInterval(winClosed);
        foo(); //Call your function here
    }

}, 250);
Posted by: Guest on April-06-2022

Code answers related to "how to close a window using a button is js"

Browse Popular Code Answers by Language