实例如下所示:
<!DOCTYPE html> <html ng-app="myApp"> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> div{ overflow: hidden; margin-top: 50px; margin-left: 500px; } .container{ width: 250px; padding: 0; } .container li{ list-style: none; border: 1px dotted gray; width: inherit; } </style> </head> <body> <div ng-controller="myCtrl"> <input type="text" ng-model="name" placeholder="请输入内容..." ng-keyup="change(name)"/> <input type="button" name="" id="" value="搜索" ng-click="change(name)"/> <ul class="container"> <li ng-repeat=" d in mes">{{d}}</li> </ul> </div> </body> <script src="/UploadFiles/2021-04-02/angular.min.js">以上这篇angularJs-$http实现百度搜索时的动态下拉框示例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。