app点击底部菜单切换标题
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>昌邑智慧园林</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-skin.css" />
	<style>
        .aui-bar-light {
            background-color: #019c8a;
        }
        .aui-bar-nav .aui-title {
            color: #fff;
        }
        .box {
            display: none;
        }
        .show {
            display: block;
        }
        .foot-btn {
            width: 1.2rem;
            display: block;
            position: relative;
            left: 50%;
            margin-left: -0.6rem;
        }
        .aui-dot{
            top: 0.5rem;
            right: 10%;
        }
        .icon-img{
            width: 1rem;
        }
	</style>
</head>
<body>
    <header id="header">
        <section class="aui-bar aui-bar-nav aui-bar-light box show " id="index_btn">
            <div class="aui-title" id="titleName">昌邑智慧园林</div>
            <a class="aui-pull-right aui-btn">
                <span class="aui-iconfont aui-icon-refresh"></span>
            </a>
        </section>
        <section class="aui-bar aui-bar-nav aui-bar-light box">
            <div class="aui-title">报警信息</div>
        </section>
        <section class="aui-bar aui-bar-nav aui-bar-light box">
            <div class="aui-title">个人中心</div>
        </section>
	</header>
    <footer class="aui-bar aui-bar-tab" id="footer">
        <div class="aui-bar-tab-item tit-in aui-active " tapmode onclick="newsgroupeOn(0,this)">
            <i class="aui-iconfont aui-icon-home"></i>
            <div class="aui-bar-tab-label">实时跟踪</div>
        </div>
        <div class="aui-bar-tab-item" tapmode onclick="newsgroupeOn(1,this)">
            <i class="aui-iconfont tit-in aui-icon-star"></i>
            <div class="aui-bar-tab-label">报警信息</div>
        </div>
        <div class="aui-bar-tab-item" tapmode onclick="newsgroupeOn(2,this)">
            <i class="aui-iconfont tit-in aui-icon-cart"></i>
            <div class="aui-bar-tab-label">个人中心</div>
        </div>
    </footer>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    var delay,header;
    apiready = function(){
        header  = document.querySelector('header');
        $api.fixStatusBar(header);
        api.parseTapmode();
        delay = api.systemType != 'ios' ? 300 : 0;
        openFrameGroup();
    };
function openFrameGroup(){
        var header_h = header.offsetHeight;
        var footer_h = footer.offsetHeight;
api.openFrameGroup({
            name: 'newsGroup',
            rect: {
                 x: 0,
                 y: header_h,
                 w: 'auto',
                 h: 'auto',
                 marginBottom:footer_h
            },
            bounces:true,
            scrollEnabled: false,
            frames: [{
                name: 'main_map_frm',
                url: 'main_map_frm.html'
            },{
                name: 'main_alarm_frm',
                url: 'main_alarm_frm.html'
            },{
                name: 'my_frm',
                url: 'my_frm.html'
            }]
        }, function(ret, err) {
            // if (ret) {
            //     alert(JSON.stringify(ret));
            // } else {
            //     alert(JSON.stringify(err));
            // }
        });
    }
    //tab切换
    // function newsgroupeOn(index, obj){
    //     var btitInBtn = document.querySelector(".aui-active");
    //     btitInBtn.classList.remove("aui-active");
    //     obj.classList.add("aui-active");
    //     if (index == 0) {
    //         document.getElementById('titleName').innerHTML='昌邑智慧园林';
    //     }else if (index == 1) {
    //         document.getElementById('titleName').innerHTML='报警信息';
    //     }else if (index == 2) {
    //         document.getElementById('titleName').innerHTML='个人中心';
    //     }
    //     api.setFrameGroupIndex({
    //         name: 'newsGroup',
    //         index: index,
    //         scroll: false
    //     })
    // }
    //
    function newsgroupeOn(index, obj){
        var btitInBtn = document.querySelector(".aui-active");
        btitInBtn.classList.remove("aui-active");
        obj.classList.add("aui-active");
var boxShow = document.querySelector('.box.show');
        boxShow.classList.remove("show");
        var box = document.querySelectorAll('.box');
        box[index].classList.add('show');
        // api.setFrameGroupIndex({
        //     name: 'newsGroup',
        //     index: index,
        //     scroll: false
        // })
    }
    function closethiswin(){
        api.closeWin({
        });
    }
</script>
</html>
app点击底部菜单切换标题的更多相关文章
- Android Studio精彩案例(二)《仿微信动态点击底部tab切换Fragment》
		转载本专栏文章,请注明出处,尊重原创 .文章博客地址:道龙的博客 现在很多的App要么顶部带有tab,要么就底部带有tab.用户通过点击tab从而切换不同的页面(大部分情况时去切换fragment). ... 
- Activity内切换fragment实现底部菜单切换遇到的坑
		1.一般说来,app底部导航都会设计为5个菜单,可以使用textView,也可使用radioButton,这里我选择用radioButton,给radioButton直接设置selector就可以实现 ... 
- 首页底部菜单FragmentTabHost的使用
		一般现在的菜单都是底部FragmentTabHost,切换Fragment来实现的,今天我们就使用这个来看看如何实现的 首先是布局文件 <?xml version="1.0" ... 
- Android自己定义TabActivity(实现仿新浪微博底部菜单更新UI)
		现在Android上非常多应用都採用底部菜单控制更新的UI这样的框架,比如新浪微博 点击底部菜单的选项能够更新界面.底部菜单能够使用TabHost来实现,只是用过TabHost的人都知道自己定义Tab ... 
- MUI框架开发HTML5手机APP(二)--页面跳转传值&底部选项卡切换
		概 述 JRedu 在上一篇博客中,我们学习了如何使用Hbuilder创建一个APP,同时如何使用MUI搭建属于自己的第一款APP,没有学习的同学可以戳链接学习: http://www.cnblo ... 
- 用Fragment实现如新浪微博一样的底部菜单的切换
		像我这个有强迫症的人来说,自从TabActivity抛弃之后,再使用看到一个个警告和一条条划着的横线,心里很不舒服,现在终于下定决心用Fragment来替换掉TabActivity了!我的研究成果如下 ... 
- app的底部菜单设计
		一.个人看法. 1.一般都是四个菜单或者五个菜单,这个是绝对主流,我估计占比达99%.当然也有三个菜单图标的,也有零个菜单图标的 2.如果该app软件功能复杂,那么尽量选择5个图标布局.比如苹果app ... 
- 转-TabHost组件(一)(实现底部菜单导航)
		http://www.cnblogs.com/lichenwei/p/3974009.html 什么是TabHost? TabHost组件的主要功能是可以进行应用程序分类管理,例如:在用户使用wind ... 
- 安卓开发笔记——TabHost组件(一)(实现底部菜单导航)
		什么是TabHost? TabHost组件的主要功能是可以进行应用程序分类管理,例如:在用户使用windows操作系统的时候,经常见到如图所示的图形界面. TabHost选项卡,说到这个组件, ... 
随机推荐
- TensorFlow安装-(Ubuntu18.04.3 & Anaconda3)
			1.背景 使用ubuntu18.04.3安装Anaconda3之后使用网上教程安装tensorflow失败,踩了多个坑,特此总结经验 附官方教程:https://tensorflow.google.c ... 
- MongoDB initial sync过程
			initial sync过程大致如下: (1)T1时间,从Primary同步所有数据库的数据,但不包括local的数据,复制时Mongo会扫描每个源数据库中的每个集合,并将所有数据插入对应的集合.通过 ... 
- MySQL 8 备份与恢复
			备份应用的场景包括:系统崩溃.硬件故障.用户错误.升级MySQL Installation.传输MySQL Installation到另一台机器.设置复制等. Slave Server备份 在备份Sl ... 
- 循环删除List集合的元素
			之前在使用list集合循环删除元素的时候,竟然出现了集合内的元素不能删除成功的问题,之后整理了一下,发现大有玄机! 1.如果指定了list的size大小,会出现下标越界异常 List<Strin ... 
- docker常见操作总结
			一.原理 1.Hypervisor是一种运行在物理服务器和操作系统之间的中间软件层,可允许多个操作系统和应用共享一套基础物理硬件,它能直接访问物理设备,会给每一台虚拟机分配内存.CPU.网络.磁盘等资 ... 
- PTA 凑零钱(深度优先搜索)
			韩梅梅喜欢满宇宙到处逛街.现在她逛到了一家火星店里,发现这家店有个特别的规矩:你可以用任何星球的硬币付钱,但是绝不找零,当然也不能欠债.韩梅梅手边有 10000 枚来自各个星球的硬币,需要请你帮她盘算 ... 
- 【优惠&正版】超级硬盘数据恢复软件(SuperRecovery)7.0正版注册码(39元一机终身授权,支持最新版)
			[优惠&正版]超级硬盘数据恢复软件(SuperRecovery)7.0正版注册码(39元一机终身授权,支持最新版) 这个软件的数据恢复效果非常好,在全世界数据恢复软件内是数一数二的. 下载地址 ... 
- js获取页面缩放比例
			今天在网上看到一位大神写的一篇文章,出处记不得了,只是因为我在做项目的时候需要用到所以看了一眼. 经理要求我把两张图表上下排列(非响应式的)改成可以适配浏览器的,刚开始只是想改样式,看到代码才发现原来 ... 
- 超级丑数--用查找的api解决
			质数又称素数.一个大于1的自然数,除了1和它自身外,不能被其他自然数整除的数叫做质数:否则称为合数. 质因数(素因数或质因子)在数论里是指能整除给定正整数的质数.除了1以外,两个没有其他共同质因子的正 ... 
- 2020.02.01【NOIP提高组】模拟B 组总结反思——数列(sequence) 树 【2012东莞市选】时间流逝 挖掘机技术哪家强
			T1 数列(sequence) 比赛时 我自以为是地打了简简单单一个判断--- 之后 Waiting-- T2 2753. 树(tree) 比赛时 这题我居然比赛时也想了很久,可能是因为我太懒,我很早 ... 
