?? 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 + -