how to hide the div which is inside an iframe?

Posted by user2092317 on Stack Overflow See other posts from Stack Overflow or by user2092317
Published on 2013-10-26T06:10:39Z Indexed on 2013/10/26 15:54 UTC
Read the original article Hit count: 225

Filed under:
|
|

I want to hide a div which is inside a iframe , is there any way to hide a div by its attributes

example: i have a iframe i need to hide the div id="content" content in php.net

<iframe src="http://php.net/" id = 'iframe'>
      <div id="content">...</div>
</iframe>

Dont know where i am doing mistake, please help me to resolve this issue

function hideIt(){
   document.getElementById('iframe').contentWindow.document.getElementById('content').style.display = 'none';
}

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html