Window close() Method

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








googletag.cmd.push(function() googletag.display('div-gpt-ad-1422003450156-2'); );



Window close() Method


❮ Window Object



Example


Use open() to open a new window, and close() to close the new window:



function openWin()


  myWindow = window.open("", "myWindow", "width=200, height=100");   // Opens a new window



function closeWin()


  myWindow.close();   // Closes the new window

Try it Yourself »

More "Try it Yourself" examples below.



Definition and Usage


The close() method closes the current window.


Tip: This method is often used together with the
open() method.



Browser Support














Method
close() Yes Yes Yes Yes Yes

Syntax



window.close()

Parameters



None

Technical Details




Return Value: No return value

More Examples



Example


Open "www.w3schools.com" in a new window, and use close() to close the
window:



function openWin()
  myWindow = window.open("https://www.w3schools.com", "_blank", "width=200, height=100");


function closeWin()
  myWindow.close();

Try it Yourself »




❮ Window Object

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Malaysia to Papua New Guinea by motorcycle?

PHP code is not being executed, instead code shows on the page