×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

应该没有问题。

本文发表在 rolia.net 枫下论坛his example illustrates how targets allow the dynamic modification of a frame's contents. First we define a frameset in the document frameset.html, shown here:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>A frameset document</TITLE>
</HEAD>
<FRAMESET rows="50%,50%">
<FRAME name="fixed" src="init_fixed.html">
<FRAME name="dynamic" src="init_dynamic.html">
</FRAMESET>
</HTML>

Then, in init_dynamic.html, we link to the frame named "dynamic".

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>A document with anchors with specific targets</TITLE>
</HEAD>
<BODY>
...beginning of the document...
<P>Now you may advance to
<A href="slide2.html" target="dynamic">slide 2.</A>
...more document...
<P>You're doing great. Now on to
<A href="slide3.html" target="dynamic">slide 3.</A>
</BODY>
</HTML>更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 昨天问了个js的问题。多谢各位,搞定了。再问一个关于frame的菜鸟问题。有一个frame,分为左右,左边为main,所有link的target指向frame的右边。但现在
    想再在左边加一个link,一点击就进入另外一个frame。这个target怎么设啊?现在是一点就在右边里面显示了个frame。
    试来试去也不成。我只好把target设成_blank了。但要打开一个新的window,感觉不是很好。
    多谢了先。
    • use top.location=URL
    • name the frame, and set the target to the frame name. Or use JS: top.leftFrameName.location = URL
      • 这招好像不灵
        • 应该没有问题。
          本文发表在 rolia.net 枫下论坛his example illustrates how targets allow the dynamic modification of a frame's contents. First we define a frameset in the document frameset.html, shown here:

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
          "http://www.w3.org/TR/html4/frameset.dtd">
          <HTML>
          <HEAD>
          <TITLE>A frameset document</TITLE>
          </HEAD>
          <FRAMESET rows="50%,50%">
          <FRAME name="fixed" src="init_fixed.html">
          <FRAME name="dynamic" src="init_dynamic.html">
          </FRAMESET>
          </HTML>

          Then, in init_dynamic.html, we link to the frame named "dynamic".

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">
          <HTML>
          <HEAD>
          <TITLE>A document with anchors with specific targets</TITLE>
          </HEAD>
          <BODY>
          ...beginning of the document...
          <P>Now you may advance to
          <A href="slide2.html" target="dynamic">slide 2.</A>
          ...more document...
          <P>You're doing great. Now on to
          <A href="slide3.html" target="dynamic">slide 3.</A>
          </BODY>
          </HTML>更多精彩文章及讨论,请光临枫下论坛 rolia.net