jQuery 选择框 Selectator
<%@tagliburi="http://java.sun.com/jsp/jstl/core"prefix="c"%><%@pageimport="com.ule.web.util.Constants"%><%@pageimport="com.ule.framework.common.ItemConstants"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/><title>测试</title><scriptsrc="<%=request.getContextPath()%>/a/jquery-1.11.0.min.js"></script><scriptsrc="<%=request.getContextPath()%>/a/fm.selectator.jquery.js"></script><linkrel="stylesheet"href="<%=request.getContextPath()%>/a/fm.selectator.jquery.css"/><script>$(document).ready(function(){var$select_brandId=$('#select_brandId');$select_brandId.click(function(){var$brandIds=$('#brandIds');if($brandIds.data('selectator')!==undefined){$brandIds.selectator('destroy');$select_brandId.val('重新选择');}else{$brandIds.selectator({showAllOptionsOnFocus:true,keepOpen:true});$select_brandId.val('确定');}});//$select_brandId.trigger('click');});//根据值选中checkbox<c:forEachvar="brandId"items="${paramValues.brandIds}">$("#brandIdsoption[value="+${brandId}+"]").attr("selected","selected");</c:forEach></script><style>#brandIds{margin-top:4PX;width:350px;height:20px;}</style></head><formmethod="post"action="/merchatItem/offLineList.do"id="listingOffLineForm"><divid="wrapper"><ulclass="colunmmb10"><li><label>品牌:</label></li><li><label><selectid="brandIds"name="brandIds"multiple="multiple"><c:forEachitems="${brandsMap}"var="brand"varStatus="status"><optionvalue="${brand.key}">${brand.key}${brandsMap[brand.key].brandName}</option></c:forEach></select></label></li><li><label><inputvalue="选择"id="select_brandId"type="button"/></label></li></ul><div></form>
实现效果:
下面的图片是源码实现的各种下拉框,一定适合你的。
附件:http://down.51cto.com/data/2366232声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。