⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 khtj.jsp

📁 jsp写的一个简单的售药系统(系统需求分析).采用sql2000数据库,通过odbc连接
💻 JSP
字号:
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="Connections/syxt.jsp" %>
<%
String Recordset1__MMColParam4 = "";
if (request.getParameter("khbh") !=null) {Recordset1__MMColParam4 = (String)request.getParameter("khbh");}
String Recordset1__MMColParam1 = "";
if (request.getParameter("khmc") !=null) {Recordset1__MMColParam1 = (String)request.getParameter("khmc");}
String Recordset1__MMColParam2 = "";
if (request.getParameter("khdh") !=null) {Recordset1__MMColParam2 = (String)request.getParameter("khdh");}
String Recordset1__MMColParam3 = "";
if (request.getParameter("khdz") !=null) {Recordset1__MMColParam3 = (String)request.getParameter("khdz");}
%>

<%
Driver DriverRecordset1 = (Driver)Class.forName(MM_syxt_DRIVER).newInstance();
Connection ConnRecordset1 = DriverManager.getConnection(MM_syxt_STRING,MM_syxt_USERNAME,MM_syxt_PASSWORD);
PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement("SELECT * FROM dbo.khzl WHERE (khbh like '%"+Recordset1__MMColParam4+"%') and (khmc like '%"+Recordset1__MMColParam1+"%') and (khdh like '%"+Recordset1__MMColParam2+"%') and (khdz like '%"+Recordset1__MMColParam3+"%') ");
ResultSet Recordset1 = StatementRecordset1.executeQuery();
boolean Recordset1_isEmpty = !Recordset1.next();
boolean Recordset1_hasData = !Recordset1_isEmpty;
Object Recordset1_data;
int Recordset1_numRows = 0;
%>
<%
int Repeat1__numRows = -1;
int Repeat1__index = 0;
Recordset1_numRows += Repeat1__numRows;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>查询客户信息</title>
</head>

<body>


	<script type="text/javascript">
		
		//定义临时参数id
var param_show_oldid="";
var param_show_number=0;
//鼠标移入到td区域,打开‘参数纠错’
function open_modify_div(param_id,kb){
	if (!(document.getElementById(param_id+'_3'))){
		if (param_show_number==1){
				var param_span_show='';
				param_span_show = document.getElementById(param_show_oldid+'_3');
				document.getElementById(param_show_oldid+'_2').removeChild(param_span_show);
				param_show_number--;	
				param_show_oldid="";
			}
		param_show_number++;
		param_show_oldid = param_id;
		var param_span_show='';
		param_span_show += '<span id="'+param_id+'_3" style="float:right;" bgcolor="#ffffff">';
		param_span_show += '<img src="./e2.gif" style="margin:7px">';
		param_span_show += '<a href="./xgkh.jsp?khbh='+kb+'">参数纠错</a></span>';
		document.getElementById(param_id+'_2').innerHTML = param_span_show + document.getElementById(param_id+'_2').innerHTML;
	}
			//<span id="param_4871_3" style="float:right;" class="param_td1" bgcolor="#ffffff"><img src="http://icon.zol.com.cn/detail0802/e2.gif" style="margin:7px"><a href="javascript:modify_param('param_4871','133527','1');">参数纠错</a></span>
	return false;
}

		
		</script>




<form id="form1" name="form1" method="post" action="khtj.jsp">
  <table width="714" height="69" border="1">
    <tr>
      <th scope="col">客户编号</th>
      <th height="27" scope="col">客户名称</th>
      <th scope="col">客户电话</th>
      <th scope="col">客户地址</th>
    </tr>
    <tr>
      <th scope="col">&nbsp;<input name="khbh" type="text" id="khbh" value="<%=Recordset1__MMColParam4%>" /></th>
      <th height="36" scope="col"><input name="khmc" type="text" id="khmc" value="<%=Recordset1__MMColParam1%>" /></th>
      <th scope="col"><input type="text" name="khdh" id="khdh"  value="<%=Recordset1__MMColParam2%>" /></th>
      <th scope="col"><input type="text" name="khdz" id="khdz"  value="<%=Recordset1__MMColParam3%>" /></th>
    </tr>
  </table>
    
  <div align="center">
    <input type="submit" name="b01" id="b01" value="查询" />
    <input type="reset" name="button" id="button" value="重置" />
    </div>
</form>

<% if (!Recordset1_isEmpty ) { %>
  <table width="713" height="68" border="2">
    <tr>
      <th width="102" height="35" scope="col">客户编号</th>
      <th width="187" scope="col">客户名称</th>
      <th width="183" scope="col">客户电话</th>
      <th width="211" scope="col">客户地址</th>
    </tr>
    <% 
	String kb="1";
	while ((Recordset1_hasData)&&(Repeat1__numRows-- != 0)) { 
	
	 kb= (Recordset1.getObject("khbh")).toString();
	
	%>
        <tr>
          <td id="param_<%=kb%>_1"  height="23" align="center"  onmouseover="open_modify_div('param_<%=kb%>','<%=kb%>')"><a href="khxsd.jsp?khbh=<%=kb%>">&nbsp;<%=kb%>&nbsp;</a></td>
          <td align="center"  onmouseover="open_modify_div('param_<%=kb%>','<%=kb%>')"><%=(((Recordset1_data = Recordset1.getObject("khmc"))==null || Recordset1.wasNull())?"":Recordset1_data)%>&nbsp;</td>
          <td align="center"  onmouseover="open_modify_div('param_<%=kb%>','<%=kb%>')"><%=(((Recordset1_data = Recordset1.getObject("khdh"))==null || Recordset1.wasNull())?"":Recordset1_data)%>&nbsp;</td>
          <td id="param_<%=kb%>_2" align="left"  onmouseover="open_modify_div('param_<%=kb%>','<%=kb%>')"><%=(((Recordset1_data = Recordset1.getObject("khdz"))==null || Recordset1.wasNull())?"":Recordset1_data)%>&nbsp;</td>
        </tr>
        <%
  Repeat1__index++;
  Recordset1_hasData = Recordset1.next();
}
%>
<script type="text/javascript">
	open_modify_div('param_<%=kb%>','<%=kb%>');
		</script>
</table>
  <% } /* end !Recordset1_isEmpty */ %>
<br />
<% if (Recordset1_isEmpty ) { %>
  没有你的查询记录!
  <% } /* end Recordset1_isEmpty */ %>
</body>
</html>
<%
Recordset1.close();
StatementRecordset1.close();
ConnRecordset1.close();
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -