开发者

Can I initiate loading of frame B from frame A?

On my web page I plan to have a "header" containing links to different parts of my site. The same "header" will be present on every page. My header also contain an image.

I started to implement this idea and start to think about frames. I though that my be I should put my header in a frame and the main content will be displayed in another frame. I though that in this way I can avoid reloading of th开发者_JAVA百科e header. It is always present and only content of the second frame is reloaded (as result of clicking links in the header). Can it be done in this way. Or, in other words, can I initiate reloading of frame B by clicking links in frame A (without reloading of frame A)?


sure, use the target attribute:

<a href="whatever.html" target="another-frame-name">

But please consider not using frames, as usually it creates horrible user experience.


Yes, you can. That's what A's target attribute is for.

Say that you have two frames, top one is named header, main one is called content.

Then, in your header, add target="content" to your links. This will tell browser to load whatever href you specified in links inside of a named frame.

One note, though. You would want to create site without frames these days.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜