ionic angularjs三级级联下拉框显示

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3   <head>
 4     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 5     <title>AngularJS 级联菜单</title>
 6     <script id="others_angular_103" type="text/javascript" class="library" src="/js/sandbox/other/angular.min.js"></script>
 7   </head>
 8 <body>
 9     <div class=‘content‘ ng-app >
10     <div ng-init="districts=[
11                 {code: ‘99‘, name: ‘省直‘, units: [
12                 {code: ‘9901‘, name: ‘省单位1‘, positions: [
13                 {code: ‘990101‘, name: ‘省职位1‘ },
14                 {code: ‘990102‘, name: ‘省职位2‘ }
15                 ]},
16                 {code: ‘9902‘, name: ‘省单位2‘, positions: [
17                 {code: ‘990201‘, name: ‘省职位3‘ },
18                 {code: ‘990202‘, name: ‘省职位4‘ }
19                 ]}
20                 ]},
21                 {code: ‘01‘, name: ‘长沙‘, units: [
22                 {code: ‘0101‘, name: ‘长沙单位1‘, positions: [
23                 {code: ‘010101‘, name: ‘长沙职位1‘ },
24                 {code: ‘010102‘, name: ‘长沙职位2‘ }
25                 ]},
26                 {code: ‘0201‘, name: ‘长沙单位2‘, positions: [
27                 {code: ‘010201‘, name: ‘长沙职位3‘ },
28                 {code: ‘010202‘, name: ‘长沙职位4‘ }
29                 ]}
30                 ]}]" >
31             <select ng-model="selectedDistrict" ng-change="selectedUnit=‘‘" ng-options="district.name for district in districts" >
32             <option value="">---请选择考区---</option>
33             </select>
34             <select ng-model="selectedUnit" ng-change="selectedPosition=‘‘" ng-options="unit.name for unit in selectedDistrict.units">
35             <option value="">---请选择单位---</option>
36             </select>
37                         <select ng-model="selectedPosition" ng-options="unit.name for unit in selectedUnit.positions">
38             <option value="">---请选择职位---</option>
39             </select>
40             </div>
41   </div>
42   </body>
43 </html>

参考资料地址:http://runjs.cn/code/9paef1xp

时间: 2024-11-06 19:40:24

ionic angularjs三级级联下拉框显示的相关文章

jquery级联下拉框

$(document).ready(function(){     //找到三个下拉框     var carnameSelect = $(".carname").children("select");     var cartypeSelect = $(".cartype").children("select");     var wheeltypeSelect = $(".wheeltype").chi

JS年月日三级联动下拉框日期选择代码

原博客网址: http://www.cnblogs.com/gdcgy/p/5467742.html 由于工作中涉及到生日编辑资料编辑,年月日用上面网址案例:bug提示: 编辑生日栏的[年]或者[月],之前保存的具体的[日]就不显示啦,产品说不管编辑哪个数据,其他数据不变: 然后自己改了一下代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xh

JQuery和ASP.NET分别实现级联下拉框效果

在学习JQuery之前知道下拉框的级联效果可以通过asp.net控件实现,现在学习了JQuery,知道了JQuery和select也能实现.我分别举两个小例子说明这两种方法如何实现. 1.用JQuery和select来实现汽车厂商和汽车类型的联动 效果图:       逻辑分析图: html代码: [html] view plain copy <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "

jquery+ligerform三级联动下拉框

如下为ligerform里的三级联动下拉框: var formData=[ {display:"县区",name:"QY",newline:true,labelWidth:100,width:220,space:50,type:"select",group:"区域信息",groupicon:"@Url.Content("~/Content/icons/32X32/communication.gif"

Web 1三级联动 下拉框 2添加修改删除 弹框

Web  三级联动 下拉框 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page { private MyDBDataContext _Context = new MyDBD

本示例演示如何通过Struts2框架提供的标签,简单地实现【级联下拉框】

1.发布房屋表单页面的级联下拉框如下: 2.     进入发布页面前需要查询下拉框数据,Action代码如下: 3.     房屋发布页面JSP代码如下: <s:doubleselect>标签的属性说明: list:                     一级下拉框的数据来源集合,和Action中集合名称一样 listKey:              一级下拉框数据集合中的实体,作为value的属性名 listValue:           一级下拉框数据集合中实体,作为text的属性名

jquery+html三级联动下拉框及详情页面加载时的select初始化问题

html写的三个下拉框,如下: <select name="ddlQYWZYJ" id="ddl_QYWZYJ" class="fieldsel" style="width: 200px;font-size:12px" ></select> <select name="ddlQYWZEJ" id="ddl_QYWZEJ" class="fields

Struts2 &lt;s:doubleselect&gt;级联下拉框 详解析

运行环境:myeclipse8.6+jboss5.1+jvm1.6 先看最后目录结构: 直接上源码: complexFormTag.jsp: <%@ page language="java" contentType="text/html; charset=gb2312"pageEncoding="gb2312"%> <%@ taglib prefix="s" uri="/struts-tags&qu

jQuery UI的下拉框显示不全解决方法

解决前,显示不全,select下拉框某些选项无法看到: <script type="text/javascript"> $("#cond_EPARCHY_CODE").selectmenu(); </script> 解决后: <style> .overflow { height: 200px; } </style> <script type="text/javascript"> $(&q