用iframe标签
1.先有一个显示界面,用iframe分别显示左右的界面
Created by IntelliJ IDEA.
User: Skye
Date: 2017/12/26
Time: 9:21
To change this template use File | Settings | File Templates.
--%>
Titleframeborder="no" border="0" marginwidth="0" marginheight=" 0"
scrolling="no" allowtransparency="yes">
frameborder="no" border="0" marginwidth="0" marginheight=" 0"
scrolling="no" allowtransparency="yes">
2.然后,分别是左边的界面show/showAll.jsp,和右边的界面welcome/hello.jsp
Created by IntelliJ IDEA.
User: Skye
Date: 2017/12/25
Time: 11:12
To change this template use File | Settings | File Templates.
--%>
Titlefunction showmenu(id){
var list = document.getElementById("list" + id);
var menu = document.getElementById("menu" + id);
if(list.style.display == "none"){
document.getElementById("list" + id).style.display="block";
menu.className = "title1";
}else{
document.getElementById("list" + id).style.display="none";
menu.className = "title";
}
}
右边界面
Created by IntelliJ IDEA.
User: Skye
Date: 2017/12/26
Time: 9:08
To change this template use File | Settings | File Templates.
--%>
Titlehello
3.重点是,在左边界面的超链接
虫害一览 部分的target属性一定要与总的显示界面上的iframe中右边部分的name相同