Window parent Property
Window Object
Definition and Usage
The parent property returns the parent window of the current window.
Syntax
Browser Support

The parent property is supported in all major browsers.
Example
Example
Alert the location of the parent window when opening the new window:
<html>
<head>
<script>
function openWin()
{
window.open('','','width=200,height=100');
alert(window.parent.location);
}
</script>
</head>
<body>
<input type="button" value="Open window" onclick="openWin()">
</body>
</html>
Try it yourself »
Window Object
Thank You For Helping Us!
Your message has been sent to W3Schools.
Close [X]