简体   繁体   中英

How can I use a hyperlink to display external page inside a div on my page?

I have a page with a menu on the left (with hyperlinks to external pages). I have a div on the right, called "main-area". When I click on the menu links, I would like the external page to open in my "main-area" div. How can I do that?

I found the solution. The target should be a iframe, not a div.

<a href="URL" target="main-area">URL</a>

<iframe name="main-area"></iframe>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM