📄 selectsmallclass_ajax.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GB2312" pageEncoding="GB2312"%>
<jsp:directive.page import="java.util.ArrayList"/>
<jsp:directive.page import="com.captainli.dboperation.SmallclassDA"/>
<jsp:directive.page import="com.captainli.bean.SmallclassBean"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>Insert title here</title>
</head>
<body>
<%//ajax实现联动菜单
if(request.getParameter("sc_bc_id").toString().equals("0")){%>
<select name="sc_id" id="sc_id">
<option value="0">--请选择药品小类--</option>
</select> <font color="#ff0000">*</font>
<%}else{
ArrayList arry = new SmallclassDA().selectSmallClassByID(Integer.parseInt(request.getParameter("sc_bc_id").toString()));
%><select name="p_sc_id" id="p_sc_id">
<option value="0">--请选择药品小类--</option><%
for(int i = 0;i < arry.size();i++){
SmallclassBean bean = (SmallclassBean)arry.get(i);
%><option value="<%= bean.getSc_id() %>"><%= bean.getSc_name() %></option><%} %></select> <font color="#ff0000">*</font>
<%} %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -