angular和angularjsangularJS——select下拉框检测改变
html:(已引⼊amazeUI)
<div >
<form class="am-form am-form-inline" >
<div class="am-input-group am-form-icon am-form-feedback ">
<span class="am-input-group-btn">
<select ng-model="type" ng-options="t.value as t.name for t in typeOptions"
class="am-form-field am-input-sm" id="typeOption" ng-change="typeChange()"> //注:⼀定是typeChange(),⽽不是typeChange </select>
</span>
</div>
</form>
</div>
js:
$pe = '1';
$peOption = [{
name:'全部',
value:'1'
},
{
name:'今天',
value:'2'
},
{
name:'昨天',
value:'3'
},
{
name:'上⼀⽉',
value:'4'
}];
$peChange = function(){
console.log('type',$pe);
...
}
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论