使用Angular-Leaflet-directive获取select选中的值

来源:互联网 发布:简单的数据库系统 编辑:程序博客网 时间:2024/05/21 08:43

使用Angular-Leaflet-directive获取select选中的值

  • html
<select class="form-control" ng-model="selectValue" ng-change="selectedChange(selectedValue)">      <!--默认的内容,不显示在选项中-->      <option style="display:none" value="">        <strong>请选择</strong>      </option>      <option>工作人员</option>      <option>天气</option>      <option ng-repeat="value in datas" value="{{value}}">          {{value}}      </option></select><button type="button" class="btn btn-success" ng-click="getValue()">OK</button>
  • js
$scope.selectedChange = function (v) {    console.log('selectedChange: ', v);}$scope.getValue = function () {   console.log("selectValue", $scope.selectValue);};
0 0
原创粉丝点击