开发者

HTML.link from a frame to another opens in new window?How can i fix it?

开发者 https://www.devze.com 2023-01-27 16:48 出处:网络
i want to have a link in frame a and open in frame b without opening new window. heres my code: <html>

i want to have a link in frame a and open in frame b without opening new window.

heres my code:

<html>
<base target="main.htm">
<body>
  <body link="blue" vlink="rgb(255,200,0)" alink="green" style="background-col开发者_C百科or:rgb(255,30,15)">
    <h2><b>ΠΕΡΙΕΧΟΜΕΝΑ</b></h2>
    <a href="personal.htm" target="main" border="0">ΠΡΟΣΩΠΙΚΑ ΣΤΟΙΧΕΙΑ </a><br/>
  <body/>
<html/>


Firstly I would suggest a valid doctype declaration, unless of course you're going for HTML5.

Secondly, I would suggest your enclose your <base> tag inside <head></head> tag

Thirdly, if you're using either XHTML or HTML 5 (as it seems you're currently doing), you will need to close your <base> tag with </base>

As for answering your actual question, you'll need to use the target attribute, as follows:

<base target="main.htm" target="_parent">

Please note that, as far as I know you can't have a link from Frame A open in Frame B, unless it's a parent frame - if you understand what I mean. To get a full understanding of what the target attribute does, check out this link.

0

精彩评论

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

关注公众号