| |

VerySource

 Forgot password?
 Register
Search
View: 1056|Reply: 6

Frame problem

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-30 18:00:01
| Show all posts |Read mode
Two frames are specified in the browser. The left side is a tree-like link navigation, and the right side is the specified web page.
  Question: The generated web page on the right is not written by me, that is, the left navigation address is arbitrarily specified. When clicking on an address, the generated web page will sometimes be in the right window I specified, and sometimes it will create a new one. Window, how can I force those newly created webpage windows to only show on my right window.
  Please help! Thank you very much!
                                                  Liu Xisheng
                                                          2017-1-4
Reply

Use magic Report

0

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-3-8 09:15:01
| Show all posts
Add between the <head> </ head> in the left window
<base target = "the ID of the right frame">
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-3-13 13:45:01
| Show all posts
No, I've tried it, but thank you "疯狂的兔子"
Reply

Use magic Report

2

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

Post time: 2020-3-21 08:45:02
| Show all posts
<a href="example1.htm" target="_blank"> this is a link </a> opens in a new window.

target = Frame name: open in the specified frame
target = _self: open in this frame page
target = _top: Jump out of frame and open on this page
target = _top = "_ blank" opens in new window
Reply

Use magic Report

2

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

Post time: 2020-3-21 13:00:01
| Show all posts
--- example.html ----
<! DOCTYPE html PUBLIC "-// W3C // DTD XHTML 1.0 Frameset // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "Content-Type" content = "text / html; charset = gb2312" />
<title> Untitled document </ title>
</ head>

<frameset rows = "*" cols = "184 *, 798 *" framespacing = "0" frameborder = "no" border = "1">
  <frame src = "left.html" name = "leftFrame" id = "leftFrame" title = "left" />
  <frame src = "right.html" name = "mainFrame" id = "mainFrame" title = "right" />
</ frameset>
<noframes> <body>
</ body>
</ noframes> </ html>

------- left.html ----
<! DOCTYPE html PUBLIC "-/ W3C // DTD XHTML 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "Content-Type" content = "text / html; charset = gb2312" />
<title> Untitled document </ title>
</ head>

<body bgcolor = "# FFFFCC">
<p> <a href="example1.htm" target="mainFrame"> example1.htm </a> </ p>
<p> <a href="example2.htm" target="mainFrame"> example2.htm </a> </ p>
<p> <a href="example3.htm" target="mainFrame"> example3.htm </a> </ p>
<p> <a href="example4.htm" target="mainFrame"> example4.htm </a> </ p>
<p> <a href="example5.htm" target="mainFrame"> example5.htm </a> </ p>
<p> <a href="example6.htm" target="mainFrame"> example6.htm </a> </ p>
<p> <a href="example7.htm" target="mainFrame"> example7.htm </a> </ p>
<p> <a href="example8.htm" target="mainFrame"> example8.htm </a> </ p>
<p> <a href="right.html" target="mainFrame"> HOME </a> </ p>
<p> <a href="right.html" target="_self"> target = _self </a> </ p>
<p> <a href="right.html" target="_top"> target = _top </a> </ p>
</ body>
</ html>

------ right.html ---------
<! DOCTYPE html PUBLIC "-/ W3C // DTD XHTML 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "Content-Type" content = "text / html; charset = gb2312" />
<title> Untitled document </ title>
<style type = "text / css">
<!-
.STYLE1 {
font-size: 36px;
font-family: "Songti";
color: # FF0000;
font-weight: bold;
}
->
</ style>
</ head>

<body>
<div align = "center" class = "STYLE1"> Welcome </ div>
</ body>
</ html>
Reply

Use magic Report

2

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

Post time: 2020-3-21 15:00:01
| Show all posts
<frame src = "left.html" name = "leftFrame" id = "leftFrame" title = "left" />
  <frame src = "right.html" name = "mainFrame" id = "mainFrame" title = "right" />

This defines the name of the framework
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-3-22 21:45:01
| Show all posts
First of all, thank you for the help of "drizzet"!
"<P> <a href="example1.htm" target="mainFrame"> example1.htm </a> </ p>" If there are many link addresses in example1.htm, there are possible targets in these addresses The value is not the window I want to specify, but I can't change the target in this webpage. How can I display the window where the sublinks in exmplli.htm appear in the frame window on the right under such circumstances?
  Thank you, please help me again.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list