标签:
废话不说,先上效果图
jap代码:
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 <%@ taglib prefix="s" uri="/struts-tags"%> 4 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 5 <html> 6 <head> 7 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 8 <title>Insert title here</title> 9 </head> 10 <body> 11 <h1>级联下拉列表</h1> 12 <!--使用下面的标签前不要忘了引入struts的标签库--> 13 <s:set name="bs" value="#{‘吉林省‘:{‘长春市‘,‘吉林市‘,‘延吉市‘},‘山东省‘:{‘青岛市‘,‘烟台市‘}}"> 14 15 </s:set> 16 17 <s:form> 18 <s:doubleselect name="dbselect" doubleList="#bs[top]" list="#bs.keySet()" doubleName="a"></s:doubleselect> 19 </s:form> 20 </body> 21 </html>
在server里运行即可
标签:
原文地址:http://www.cnblogs.com/juson37/p/5831427.html