Main.html
<! Doctype HTML public "-// W3C // dtd html 4.01 frameset // en" "http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8">
<Title> mainframes </title>
</Head>
<Frameset rows = "30%, 40%, 30%" Cols = "" border = "1" frameborder = "yes">
<Frame src = "http://blog.163.com/wenchangqing_live/blog/a.jsp" name = "topframe" scrolling = "no" noresize = "noresize" id = "frames1"/>
<Frame src = "http://blog.163.com/wenchangqing_live/blog/ B .jsp" name = "mainframe" scrolling = "no" noresize = "noresize" id = "frames2"/>
<Frame src = "http://blog.163.com/wenchangqing_live/blog/c.jsp" name = "bottomframe" scrolling = "no" noresize = "noresize" id = "frames3"/>
<Noframes>
<Body>
<P> This page uses frames. The current browser you are using does not support frames. </P>
</Body>
</Noframes>
</Frameset>
</Html>
. JSP
<% @ page Language = "Java" contenttype = "text/html; charset = UTF-8"
pageencoding = "UTF-8" %>
. JSP
B. JSP
C. JSP
A and B
Use js to control the framework
</Body>
</Html>
B. jsp
<% @ Page Language = "Java" contenttype = "text/html; charset = UTF-8"
Pageencoding = "UTF-8" %>
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8">
<SCRIPT type = "text/JavaScript" src = "http://blog.163.com/wenchangqing_live/blog/./js/system.js"> </SCRIPT>
<Title> B. jsp </title>
</Head>
<Body bgcolor = "# fed342">
This is B. jsp!
<A id = "A" onclick = "test ()" href = "http://blog.163.com/wenchangqing_live/blog/#"> A. jsp </a>
</Body>
</Html>
C. jsp
<% @ Page Language = "Java" contenttype = "text/html; charset = UTF-8"
Pageencoding = "UTF-8" %>
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8">
<Title> C. jsp </title>
</Head>
<Body bgcolor = "#565321" type = "codeph" text = "/codeph">
This is C. jsp
</Body>
</Html>
System. js
Function logina (){
Alert ("Changing B and C frameworks at the same time ");
Parent. Mainframe. Location. href ("C. jsp ");
Parent. bottomframe. Location. href ("B. jsp ");
}
Function loginc (){
Alert ("Change B. jsp of framework B to C. jsp ");
Parent. Mainframe. Location. href ("C. jsp ");
}
Function loginb (){
Alert ("Change C. jsp of the c framework to B. jsp ");
Window. Parent. Frames ["bottomframe"]. Location. href ("B. jsp ");
}
the jump to the frame can be:
1: window. parent. frames ["framework to be modified"]. location. href ("Jump path");
2: window. parent. frames. item ). location. href ("Jump path");
3: window. parent. frames. item ("framework to be modified this is framework name "). location. href ("Jump path");
4: window. parent. framework name. location. href ("Jump path");
5: window. parent ["framework name"]. location. href ("Jump path");
6: window. parent. frames. framework name. location. href ("Jump path");