📄 produit.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<jsp:directive.page import="com.captainli.dboperation.BigclassDA"/>
<jsp:directive.page import="com.captainli.bean.BigclassBean"/>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'produit.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="../css/sys.css">
<style type="text/css">
<!--
body {
margin-left: 5px;
margin-top: 5px;
margin-right: 5px;
margin-bottom: 5px;
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) {
pscid.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/produit_selectSmallclass_ajax.jsp?p_bc_id="+pbcid); //实现级联下拉列表
document.getElementById("produitframe").src = "produit_frame.jsp?p_bc_id="+pbcid+"";
}
function sub(){
var pbcid = document.getElementById("p_bc_id").value;
var pscid = document.getElementById("p_sc_id").value;
document.getElementById("produitframe").src = "produit_frame.jsp?p_bc_id="+pbcid+"&p_sc_id="+pscid+"";
}
</script>
</head>
<%
ArrayList arryBigclass = new BigclassDA().selectBigClass();//大类
%>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
<tr>
<td width="30%" align="left"><span class="style1">请选择药品大类:</span>
<select name="p_bc_id" id="p_bc_id" onChange="F_super()">
<option value="0">--请选择药品大类--</option><%
for(int i = 0;i < arryBigclass.size();i++){
BigclassBean bean = (BigclassBean)arryBigclass.get(i);
%>
<option value="<%= bean.getBc_id() %>"><%= bean.getBc_name() %></option>
<%} %>
</select>
</td>
<td width="15%" align="left"><div align="right"><span class="style1">请选择药品小类:</span></div></td>
<td width="20%" height="30" id="pscid" align="left">
<select name="p_sc_id" id="p_sc_id">
<option>--请选择药品小类--</option>
</select>
</td>
<td width="35%" align="left"> </td>
</tr>
</table>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td align="left" valign="top"><iframe scrolling='no' width="100%" height="100%" frameborder="0" name="produitframe" id="produitframe" src="produit_frame.jsp"></iframe></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -