<!DOCTYPE html> <html ng-app="test"> <head> <title></title> <style type="text/css"> body { position: relative; } .ceshi { width: 400px; margin: 0 auto; } .select-template { padding: 30px 10px; } .select-btn { height: 34px; padding: 6px; color: #666; border-color: #e4e4e4; } div#linkBox1, div#linkBox2 { font-family: arial; font-size: 12px; text-align: left; border: 1px solid #AAA; background: #FFF none repeat scroll 0% 0%; z-index: 9999; visibility: hidden; position: absolute; padding: 0px; border-radius: 3px; white-space: nowrap; } .intcaselink { cursor: pointer; padding: 3px 8px 3px 8px; margin: 5px; background: #EEE none repeat scroll 0% 0%; border: 1px solid #AAA; border-radius: 3px; } </style> </head> <body ng-controller="main"> <div class="ceshi"> <div class="select-template"> <select class="select-btn" ng-model="selectAList.value" ng-change="selectChangeFun1()"> <option value="-1">请选择</option> <option value="{{item.id}}" ng-repeat="item in selectAList.dataList track by $index">{{item.name}}</option> </select> </div> <div style="background-color: pink;" class="select-template" ng-click="hiddenLinkBox2()"> <select class="select-btn" ng-model="selectBList.value" ng-click="selectClickFun1($event)"> <option value="-1">请选择</option> <option value="{{item.id}}" ng-repeat="item in selectBList.dataList track by $index">{{item.name}}</option> </select> </div> <div ng-show="showLinkBox1" class="intcases" id="linkBox1" style=" top: 35px;left: 600px;visibility: inherit; z-index: 1003;"> <div class="intcaselink">APP推送(链接)</div> <div class="intcaselink">APP推送(专题)</div> <div class="intcaselink">APP推送(活动)</div> <div class="intcaselink">APP推送(商品)</div> </div> <div ng-show="showLinkBox2" class="intcases" id="linkBox2" style=" top: 135px;left: 600px;visibility: inherit; z-index: 1003;"> <div class="intcaselink">APP推送(链接)</div> <div class="intcaselink">APP推送(专题)</div> <div class="intcaselink">APP推送(活动)</div> <div class="intcaselink">APP推送(商品)</div> </div> </div> </body> </html>
ng-change事件中如何获取$event和如何在子元素事件中阻止调用父级元素事件(阻止事件冒泡) (2)
内容版权声明:除非注明,否则皆为本站原创文章。