|
| |
精品推荐 |
 |
|
| |
|
|
|
|
在一个jsp页面实现二级下拉框联动
|
日期:2008年2月26日 作者: 查看:[大字体
中字体 小字体]
|
} out.print("</select>"); } catch (Exception e)...{ } finally...{ try...{ if (rs != null) rs.close(); if (conn != null) conn.close(); } catch (Exception e)...{ e.printStackTrace(); } } } if (request.getParameter("findObject").equals("hymx_dm"))...{ DBConnect conn = null; ResultSet rs = null; try...{ out.print("<select name='hymx_dm' >"); String sql = null; if (request.getParameter("initValue").equals(""))...{ sql = "select * from dm_hy"; } else...{ sql = "select * from dm_hy where hy_dm like '"+request.getParameter("initValue")+"%'"; } conn = new DBConnect(); conn.setPstmt(sql); rs = conn.executeQuery(sql); while(rs.next())...{ out.print("<option value='"+rs.getString("hy_dm")+"'>"+rs.getString("hy_mc")+"</option>");
上一篇:JSP/Servlet的URL重定向的技巧
下一篇:在J2ME手机程序开发中使用颜色
|
| 相关文章: |
|
|
|
| 相关软件: |
|
|
|
|