關鍵代碼以下:spa
form.on('select(groupCode)', function(data){ console.log($(data.elem).find("option:selected").attr("title")); });
相關代碼:code
SELECT渲染以下orm
<select name="groupCode" lay-search lay-filter="groupCode"> <option value=""></option> <c:if test="${list!=null }"> <c:forEach items="${l}" var="item" varStatus="status"> <option value="${item.id}" title="${item.age }">${item.name}</option> </c:forEach> </c:if> </select>