当前位置: 移动技术网 > IT编程>开发语言>Java > frameset布局时frame中src路径的页面没有加载的解决方法

frameset布局时frame中src路径的页面没有加载的解决方法

2017年12月12日  | 移动技术网IT编程  | 我要评论
解决方法:将页面的body节点去掉,错误代码如下
复制代码 代码如下:

<%@ page language="java" contenttype="text/html; charset=gb18030"
pageencoding="gb18030"%>
<%
string path = request.getcontextpath();
string basepath = request.getscheme()+"://"+request.getservername()+":"+request.getserverport()+path+"/";
%>
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd">
<html>
<head>
<base href="<%=basepath%>">
<meta http-equiv="content-type" content="text/html; charset=gb18030">
<title>主页</title>
</head>
<body>
<frameset rows="15%,70%,15%" frameborder="yes" >
<frame scrolling="auto" src="indextop.jsp"></frame>
<frame scrolling="auto" src="indexmain.jsp"></frame>
<frame scrolling="auto" src="indexbottom.jsp"></frame>
</frameset>
</body>
</html>

由于frameset是一种框架结构,将整个页面占据掉,不要用body进行布局

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网