JSP页面问题 我要做个页面,左边放一列按钮,点击按钮读数据库在右边显示不同的页面或数据,这个页面怎么写?JSP 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果页面刷新的话,可以将链接写入按钮,到对应的action中,获取数据库的结果集,返回至页面的右边。如果不刷新页面的话,楼主可以用ajax实现,挺简单的。 可以用frameset 框架, 分为左右两部分,左面写按钮,右面显示你数据库读取的数据或者页面 同意楼上,使用frameset,把按钮改成超链接传递参数,到servlet,如果是ssh框架的话就是action,在里面添加查询函数。 你也可以使用div将左边的按钮包围起来,然后使用左浮动。 各位大虾,能否写个简单的jsp页面例子来解说一下呢,纯文字我比较不好理解啊~~~!!! 其实办法有很多种:1、用Ajax动态更新(要求对ajax有概念)2、用iframe,3、用frameset <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>后台管理系统</title> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> </head> <frameset rows="93,*" cols="*" frameborder="yes" border="0px" bordercolor="#0970BB" framespacing="0px"> <frame src="/qiyueOA/frame/top.jsp" name="topFrame" noresize="noresize" bordercolor="#0970BB" scrolling="No" id="topFrame" title="topFrame" /> <frameset cols="213,*" frameborder="yes" border="0px" framespacing="0px" bordercolor="#0970BB"> <frame src="/qiyueOA/frame/menu_left.jsp" name="leftFrame" noresize="noresize" scrolling="No" id="leftFrame" title="leftFrame" bordercolor="#0970BB" /> <frame src="/qiyueOA/frame/con_center.jsp" name="mainFrame" noresize="noresize" id="mainFrame" title="mainFrame" /> </frameset></frameset></html>这是页面的结构 上边是logo 左边是菜单列表 右边是 不同菜单对应的内容显示区域 菜单按键对应的链接要指到所要显示的页面区域<a href="<%=path %>/work/SendEmail_execute" target="mainFrame">发送邮件</a> <%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030"%><!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=GB18030"><title>Insert title here</title></head><body><frameset rows="50%,50%"><frame src="/MailManagement/jsp/head.jsp" /><frameset cols="25%,75%"><frame src="/MailManagement/jsp/button.jsp"><frame src="/MailManagement/jsp/content.jsp"></frameset></frameset></body></html>我这么写,为什么就不行呢,那几个页面都是简单页面,但是浏览器上一片空白,求解 ~~~~ 嵌套的页面怎么获取后台传过来的lis值 求RBAC权限管理模型实例 跪求 jdbc插入数据到xml jquery.form有时乱码 MySQL连接问题,知道了帮下忙,谢谢。 jni技术中,本地代码与JAVA之间涉及到指针传递怎么办? tomcate中配置连接池问题。 关于数据库查询的 效率 tomcat问题 三个存储着相同数据的列表,如何同步效率比较高呢? 一表多字段数据映射 spring aop:aspectj-autoproxy错误 高手指教
如果不刷新页面的话,楼主可以用ajax实现,挺简单的。
1、用Ajax动态更新(要求对ajax有概念)
2、用iframe,
3、用frameset
<html>
<head>
<title>后台管理系统</title>
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<frameset rows="93,*" cols="*" frameborder="yes" border="0px" bordercolor="#0970BB" framespacing="0px">
<frame src="/qiyueOA/frame/top.jsp" name="topFrame" noresize="noresize" bordercolor="#0970BB" scrolling="No" id="topFrame" title="topFrame" />
<frameset cols="213,*" frameborder="yes" border="0px" framespacing="0px" bordercolor="#0970BB">
<frame src="/qiyueOA/frame/menu_left.jsp" name="leftFrame" noresize="noresize" scrolling="No" id="leftFrame" title="leftFrame" bordercolor="#0970BB" />
<frame src="/qiyueOA/frame/con_center.jsp" name="mainFrame" noresize="noresize" id="mainFrame" title="mainFrame" />
</frameset>
</frameset>
</html>这是页面的结构 上边是logo 左边是菜单列表 右边是 不同菜单对应的内容显示区域
菜单按键对应的链接要指到所要显示的页面区域
<a href="<%=path %>/work/SendEmail_execute" target="mainFrame">发送邮件</a>
pageEncoding="GB18030"%>
<!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=GB18030">
<title>Insert title here</title>
</head>
<body><frameset rows="50%,50%"><frame src="/MailManagement/jsp/head.jsp" /><frameset cols="25%,75%">
<frame src="/MailManagement/jsp/button.jsp">
<frame src="/MailManagement/jsp/content.jsp">
</frameset></frameset>
</body>
</html>我这么写,为什么就不行呢,那几个页面都是简单页面,但是浏览器上一片空白,求解 ~~~~