How to get links to open in an iframe?

Asked

Viewed 188 times

6

How do I make the page menu index.html open the pages inside the iframe contained in the same document (index.html).

For example, by clicking on link down the page contato.html is carried inside the iframe that’s on the page index.html.

<a href="contato.html">Contato</a>

1 answer

7


If the iframe of index.html was declared so:

<iframe name="principal" src="pagina.html"></iframe>

The link will be:

<a href="contato.html" target="principal">Contato</a>

I put in the Github for future reference.

The target principal is the name of iframe.

Browser other questions tagged

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