1 2 3 4 | <taglib> <uri>http://ajaxtags.org/tags/ajax</uri> <location>/WEB-INF/ajaxtags.tld</location> </taglib> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <label for="make">Make:</label> <select id="make"> <option value="">Select make</option> <option value="Ford">Ford</option> <option value="Honda">Honda</option> <option value="Mazda">Mazda</option> </select> <span id="progressMsg" style="display:none;"> <img alt="Indicator" src="<%=request.getContextPath()%> /img/indicator.gif" /> Loading...</span> <label for="model">Model:</label> <select id="model" disabled="disabled"> <option value="">Select model</option> </select> |
1 2 3 4 5 6 7 8 9 | <ajax:select baseUrl="${contextPath}/dropdown.view" source="make" target="model" parameters="make={make}" preFunction="initProgress" emptyOptionName="Select model" postFunction="resetProgress" errorFunction="reportError" /> |
1 2 | <c:set var="contextPath" scope="request"> ${pageContext.request.contextPath}</c:set> |
1 | parameters="make={make}" |
1 | http://localhost:8080/ajaxtags-1.3-beta-rc6-1/dropdown.view?make=Mazda |
1 2 3 4 5 6 7 8 9 10 11 12 | <script type="text/javascript"> new AjaxJspTag.Select( "/ajaxtags-1.3-beta-rc6-1/dropdown.view", { parameters: "make={make}", postFunction: resetProgress, target: "model", preFunction: initProgress, source: "make", emptyOptionName: "Select model", errorFunction: reportError }); </script> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |