display specific content in HTML iframe

Asked

Viewed 17 times

0

I have in the "page1.html" two div Example:

<div id="teste1">teste1</div>
<div id="teste2">teste2</div> 

in "page2.html" I have an iframe and in it I want to display only one of the div with iframe. Example:

<iframe src="./pagina1.html#teste1" frameborder="0"></iframe>

It should display only the contents of the div "id="teste1"". How to do that?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.