How to make links open in an iframe?

6

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

For example, clicking the link page below the contato.html page loads into the iframe that is on the index.html page.

<a href="contato.html">Contato</a>
    
asked by anonymous 26.08.2015 / 20:26

1 answer

7

If iframe of index.html is declared as:

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

The link will be:

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

Target principal is the name of iframe .

    
26.08.2015 / 20:30