I want to close a browser window whether it is in open
. Am new for javascript so help me to create the below logic using javascript. My JavaScript code is here:
if (myWindow.open() == true) {
myWindow.close();
} else {
myWindow=window.open('http://index.html',
'popUpWindow',
'height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes'
);
}