After all the time of staying away from things like iframes, it finally caught back on me. A client wants a part of his Shop showing on his website, via iFrame.
But lets just skip right to the problem:
There is the main html site, which holds the iframe displaying the shop. Above that iframe, there is a submenu, which is supposed开发者_StackOverflow to open links INSIDE the iframe.
The problem is, that I don't have any clue how to do that. Is there a way of using anchors to switch / navigate sites inside an iframe?
Thanks in advance, I hope you guys can help me with this.
Give the iframe
a name
attribute (e.g. name="shopContent"
). You can then make links access the iframe
using the target
attribute on your link element:
<a href="bananas.htm" target="shopContent">Bananas</a>
精彩评论