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

转载于:https://www.cnblogs.com/BetterMyself/p/7117581.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值