Jump to content

window.parent


Matej

Recommended Posts

Hi , why do i have to set "document.body" here:

function myFunction() {parent.document.body.style.backgroundColor = "red";}

?

 

window.parent reffers to a parent window so why do i have to "set again" the parent window by "document.body"?

 

example http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_parent2

 

thanks for answers

Edited by Matej
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...