query.jsp
<%@ page language="java" import="java.util.*,kan.jian.mei.client.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><%@ page contentType="text/html; charset=gb2312"%>
<%
request.setCharacterEncoding("gb2312"); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'query.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
<%
String userName = request.getParameter("userName");
BookInfoClient qp = new BookInfoClient();
String BookInfo = qp.getInfoByName(userName);
out.println(userName);
%>
<form name="bookinfo" action="query.jsp" method="post" onsubmit="return false;">
输入书籍名称:<input type="text" value="<%=userName%>" name="userName"><br><br>
<input type="submit" value="查询">
</form>
<div>
<br><div><%=BookInfo%></div>
</div>
</body></html>
我想要实现的功能是输入书籍名称之后点击查询按钮之后div中的bookinfo信息显示出来,可是现在点击根本没有反应,而且bookinfo显示区域一直显示null,我以前貌似解决过类似问题,但是现在好久没用就忘记了,哪位大侠知道帮个忙,十分感谢
<%@ page language="java" import="java.util.*,kan.jian.mei.client.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><%@ page contentType="text/html; charset=gb2312"%>
<%
request.setCharacterEncoding("gb2312"); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'query.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
<%
String userName = request.getParameter("userName");
BookInfoClient qp = new BookInfoClient();
String BookInfo = qp.getInfoByName(userName);
out.println(userName);
%>
<form name="bookinfo" action="query.jsp" method="post" onsubmit="return false;">
输入书籍名称:<input type="text" value="<%=userName%>" name="userName"><br><br>
<input type="submit" value="查询">
</form>
<div>
<br><div><%=BookInfo%></div>
</div>
</body></html>
我想要实现的功能是输入书籍名称之后点击查询按钮之后div中的bookinfo信息显示出来,可是现在点击根本没有反应,而且bookinfo显示区域一直显示null,我以前貌似解决过类似问题,但是现在好久没用就忘记了,哪位大侠知道帮个忙,十分感谢
解决方案 »
- Struts1.2中遇到的问题,郁闷了一个星期了
- javabean的.class问题
- 求助:hibernate查询返回实体类中的实体类对象值为nul
- 【润乾报表】遇到点问题,请教下大牛
- jbuilder中开发web services?
- 那为能提供一个完整的基于JBoss的CMP实体EJB实例。。。。
- 用jbuild生成的测试文件测试ejb时为何出错
- 关于Spring的事务问题
- 送分啦!!!可以从其他的途径获取原来由@PersistenceContext注解得到的EntityManager吗!!!
- solr导入了多个entity,如何指定一个entity查询全部呢?
- java串口通信多线程的数据收发问题
- js如何设计可以让错误信息变为可修改的
是不是该去掉????
<form name="bookinfo" action="query.jsp" method="post" onsubmit="return false;">红色部分 不能写false,否则怎么都提交不了,onsubmit="return false;全去了