1. html <select ng-model="selectOrderState" style="border:none;left:0" ng-options="state.name for state in orderStates"></select> 2. js //订单状态 $scope.orderStates=[ {name:'全部',id:""}, {name:'等待审核',id:&quo
ng-options一般有以下用法: 数组作为数据源: label for value in array select as label for value in array label group by group for value in array label disable when disable for value in array label group by group for value in array track by trackexpr label disable whe
//**1.设置选中值:(根据索引确定选中值)**// var osel=document.getElementById("selID"); //得到select的ID var opts=osel.getElementsByTagName("option");//得到数组option var obt=document.getElementById("bt"); obt.onclick=function(){ opts[3].selected=tr