📄 test.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<%@page import="com.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="javascript">
function check()
{
if(document.myform.query.value=="")
{window.alert("请输入查询语句");
document.myform.query.focus();
return false;
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>Insert title here</title>
</head>
<%String query = request.getParameter("query");
request.setCharacterEncoding("GBK"); %>
<body>
<form method="post" action="test.jsp" name="myform">
<p>
</p>
<p>
请输入字段的内容
</p>
<p>
<input name="query">
</p>
<p>
</p>
<p>
<input type="submit" name="bu" onclick="return check();" value=提交>
</p>
<p>
</p>
</form>
<%
if (query != "" && query != null)
{
String sql = "select * from inhibitor where AcNumber='" + query
+ "'";
GetResultByFormat table = new GetResultByFormat();
StringBuffer bu = table.getResult_withTableFormat(sql);
out.print(bu);
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -