📄 purchase_seletpro.jsp
字号:
<%@ page language="java" contentType="text/html; charset=gb2312"%>
<jsp:directive.page import="java.util.ArrayList"/>
<jsp:directive.page import="com.captainli.dboperation.BigclassDA"/>
<jsp:directive.page import="com.captainli.bean.BigclassBean"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>选择进货药品...</title>
<link rel="stylesheet" type="text/css" href="../css/sys.css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
}
a:link {
color: #1A438E;
text-decoration: underline;
}
a:visited {
text-decoration: underline;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: underline;
}
.style1 { color: #1A438E;
font-size: 12px;
}
.style2 { color:#FF0000;
font-size: 12px;
}
-->
</style>
<script type="text/javascript" language="javascript">
var http_request = false;
function createRequest(url) {
//初始化对象并发出XMLHttpRequest请求
http_request = false;
if (window.XMLHttpRequest) { // Mozilla或其他除IE以外的浏览器
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType("text/xml");
}
} else if (window.ActiveXObject) { // IE浏览器
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert("不能创建XMLHTTP实例!");
return false;
}
http_request.onreadystatechange = alertContents; //指定响应方法
//发出HTTP请求
http_request.open("GET", url, true);
http_request.setRequestHeader("If-Modified-Since","0");
http_request.send(null);
}
function alertContents() { //处理服务器返回的信息
if (http_request.readyState == 4) {
if (http_request.status == 200) {
xiaolei.innerHTML=http_request.responseText;
} else {
alert('您请求的页面发现错误');
}
}
}
</script>
<script type="text/javascript" language="javascript">
function F_super(){
var pbcid = document.getElementById("p_bc_id").value;
createRequest("../utilPages/purchase_seletpro_ajax.jsp?sc_bc_id="+pbcid); //实现级联下拉列表
}
function xiao(){
var pscid = document.getElementById("p_sc_id").value;
createRequestxiao("../utilPages/purchase_seletproshow_ajax.jsp?p_sc_id="+pscid);
}
function show(){
var tmp = document.getElementById("p_name");
parent.window.returnValue = tmp.value;
window.close();
}
</script>
<script type="text/javascript" language="javascript">
var http_request = false;
function createRequestxiao(url) {
//初始化对象并发出XMLHttpRequest请求
http_request = false;
if (window.XMLHttpRequest) { // Mozilla或其他除IE以外的浏览器
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType("text/xml");
}
} else if (window.ActiveXObject) { // IE浏览器
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert("不能创建XMLHTTP实例!");
return false;
}
http_request.onreadystatechange = alertContentsxiao; //指定响应方法
//发出HTTP请求
http_request.open("GET", url, true);
http_request.send(null);
}
function alertContentsxiao() { //处理服务器返回的信息
if (http_request.readyState == 4) {
if (http_request.status == 200) {
pname.innerHTML=http_request.responseText;
} else {
alert('您请求的页面发现错误');
}
}
}
</script>
</head>
<%
//药品大类
ArrayList arryBig = new BigclassDA().selectBigClass();
%>
<body>
<form name="form1" method="post" action="">
<table width="400" height="235" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEF7FD">
<tr>
<td align="left" valign="top"><table width="400" height="224" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="39%" height="30" align="right">药品大类:</td>
<td width="61%"><select name="p_bc_id" id="p_bc_id" onChange="F_super()" style="width:150px; ">
<option value="0">--所有药品大类--</option>
<%
for(int i = 0;i < arryBig.size();i++){
BigclassBean bean = (BigclassBean)arryBig.get(i);
%>
<option value="<%= bean.getBc_id() %>"><%= bean.getBc_name() %></option>
<%} %>
</select></td>
</tr>
<tr>
<td height="30" align="right">药品小类:</td>
<td id="xiaolei"><select name="p_sc_id" id="p_sc_id" style="width:150px; ">
<option value="0">--所有药品小类--</option>
</select></td>
</tr>
<tr align="center" valign="top">
<td height="144" colspan="2" id="pname"><select name="p_name" size="100" id="p_name" style="height:140px; width: 200px ">
</select></td>
</tr>
<tr align="center" valign="middle">
<td height="30" colspan="2"><input name="Submit" type="button" class="button" value=" 选择 " onclick="return show()"></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -