PhoneGap中文网
标题:
<select><option>标签内无法获取到选中选项的值。
[打印本页]
作者:
blak_2016
时间:
2016-5-13 10:54
标题:
<select><option>标签内无法获取到选中选项的值。
<div>
<p>机构</p>
<select class="label button button-block">
<option value="" >请选择机构</option>
<option ng-repeat="institution in institutions">
{{institution.name}}</option>
</select>
</div>
求教,如何获取到这个选中的institution呢?是加ng-modal ng-selected还是换标签呢?
作者:
木木2016
时间:
2016-8-1 19:13
<form novalidate> <div class="list list-inset"> <label class="item item-input"> <i class="icon ion-search placeholder-icon"></i> <input type="text" placeholder="搜索" ng-model="search.Sname" ng-change="change()"> </label> </div> <div class="row"> <div class="col col-33" style="text-align:center;"> <select ng-model="company.Cname" class="select"> <option value="">请选择</option> <option ng-repeat="c in companies" value="{{c.cid}}">{{c.cname}}</option> </select> </div> <div class="col col-33" style="text-align:center;"> <select ng-model="type.Tname" class="select"> <option value="">请选择</option> <option ng-repeat="t in insurance" value="{{t.tid}}">{{t.tname}}</option> </select> </div> <div class="col col-33" style="text-align:right;"> <button class="button button-small button-positive" ng-click="search()"> 搜索 </button> </div> </div> </form> <pre ng-show="false">{{search}}</pre> <pre ng-show="false">{{company}}</pre> <pre ng-show="false">{{type}}</pre>
作者:
木木2016
时间:
2016-8-1 19:14
controller:
$scope.
companies
= [{
"cid"
:
"1"
,
"cname"
:
"平安"
},{
"cid"
:
"2"
,
"cname"
:
"华夏"
}];
$scope.
insurance
= [{
"tid"
:
"11"
,
"tname"
:
"产险"
},{
"tid"
:
"12"
,
"tname"
:
"寿险"
}];
$scope.
search
= {};
$scope.
company
= {};
$scope.
type
= {};
$scope.
change
=
function
() {
$http({
method
:
"POST"
,
url
:
'http://10.200.47.69:80/myApp/policy/search'
,
params
:{
page
:
1
,
count
:
10
,
content
:$scope.
search
.Sname,
cname
:$scope.
company
.Cname,
tname
:$scope.
type
.Tname}
}).
success
(
function
(data) {
vm
.
messages
= data.
items
;
});
};
作者:
egoist1925
时间:
2016-8-2 09:15
select加ng-modal吧。。
欢迎光临 PhoneGap中文网 (http://bbs.phonegap100.com/)
Powered by Discuz! X3.2