这篇文章主要介绍HTML中实现通讯录界面切换的示例,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
具体代码如下所示:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>用ionic(选项卡栏tab) icon(图标) ionic上拉菜单(ActionSheet) 实现通讯录界面切换操作</title> <link rel="stylesheet" href="../ionic/css/ionic.css" rel="external nofollow" > <script src="../ionic/js/ionic.bundle.min.js"></script> <script type="text/javascript"> angular.module('myApp', ['ionic']) .controller('RootCtrl', function($scope) { $scope.onControllerChanged = function(oldController, oldIndex, newController, newIndex) { console.log('Controller changed', oldController, oldIndex, newController, newIndex); console.log(arguments); }; }) .controller('HomeCtrl', function($scope, $timeout, $ionicModal, $ionicActionSheet) { $scope.items = []; $ionicModal.fromTemplateUrl('newTask.html', function(modal) { $scope.settingsModal = modal; }); //ionic 上拉菜单(ActionSheet) var removeItem = function(item, button) { $ionicActionSheet.show({ buttons: [], destructiveText: 'Delete Task', cancelText: 'Cancel', cancel: function() { return true; }, destructiveButtonClicked: function() { $scope.items.splice($scope.items.indexOf(item), 1); return true; } }); }; var completeItem = function(item, button) { item.isCompleted = true; }; $scope.onReorder = function(el, start, end) { ionic.Utils.arrayMove($scope.items, start, end); }; $scope.onRefresh = function() { console.log('ON REFRESH'); $timeout(function() { $scope.$broadcast('scroll.refreshComplete'); }, 1000); } $scope.removeItem = function(item) { removeItem(item); }; $scope.newTask = function() { $scope.settingsModal.show(); }; // Create the items $scope.user = [ { name:"Ben Sparrow", words:"You on your way?" }, { name:"Max Lynx", words:"Hey,it's me." }, { name:"Adam Bradleyson", words:"I should buy a boat." }, { name:"Perry Governor", words:"Look at my mukluks!" }, { name:"Mike Harrinqton", words:"This is wicked good ice cream." }, ]; }) </script> </head> <body ng-app="myApp" ng-controller="RootCtrl"> <ion-tabs class="tabs-icon-only tabs-positive"> <ion-tab title="Home" icon-on="ion-ios-filing" icon-off="ion-ios-filing-outline" ng-controller="HomeCtrl"> <ion-header-bar class="bar-stable"> <h2 class="title">Chats</h2> </ion-header-bar> <ion-content has-tabs="true" on-refresh="onRefresh()"> <ion-refresher></ion-refresher> <ion-list scroll="false" on-refresh="onRefresh()" s-editing="isEditingItems" animation="fade-out" delete-icon="icon ion-minus-circled"> <ion-item ng-repeat="item in user" item="item" buttons="item.buttons" can-delete="true" can-swipe="true" on-delete="deleteItem(item)" ng-class="{completed: item.isCompleted}"> <span> <img src="../img/y.jpg" height="56" width="56"/> <p ><b>{{item.name}}</b></p> <p >{{item.words}}</p> <i class="ion-chevron-right" "></i> </span> </ion-item> </ion-list> </ion-content> </ion-tab> <ion-tab title="About" icon-on="icon ion-ios-clock" icon-off="icon ion-ios-clock-outline"> <header class="bar bar-header bar-stable"> <h2 class="title">Deadlines</h2> </header> <ion-content has-header="true"> <center> <img src="../img/q.jpg" height="462" width="427"/> </center> </ion-content> </ion-tab> <ion-tab title="Settings" icon-on="icon ion-ios-gear" icon-off="icon ion-ios-gear-outline"> <header class="bar bar-header bar-stable"> <h2 class="title">Settings</h2> </header> <ion-content has-header="true"> <center> <img src="../img/y.jpg" height="462" width="427"/> </center> </ion-content> </ion-tab> </ion-tabs> </body> </html>
html的全称为超文本标记语言,它是一种标记语言,包含了一系列标签.通过这些标签可以将网络上的文档格式统一,使分散的Internet资源连接为一个逻辑整体,html文本是由html命令组成的描述性文本,html命令可以说明文字,图形、动画、声音、表格、链接等,主要和css+js配合使用并构建优雅的前端网页。
以上是“HTML中实现通讯录界面切换的示例”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。