<!doctype html>
<html> <head>
<meta charset="UTF-8">
<title></title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="css/mui.min.css" rel="stylesheet" />
<script src="js/mui.min.js"></script>
<script src="js/h.js"></script>
<script type="text/javascript">
mui.init({
subpages: [{
url: 'sub1.html',
id: 'sub1.html',
styles: { top: '44px', bottom: '44px', width: '100%' }
}, {
url: 'sub2.html',
id: 'sub2.html',
styles: { top: '44px', bottom: '44px', width: '100%', left: '100%' }
}, {
url: 'sub3.html',
id: 'sub3.html',
styles: { top: '44px', bottom: '44px', width: '100%', left: '200%' }
}, {
url: 'sub4.html',
id: 'sub4.html',
styles: { top: '44px', bottom: '44px', width: '100%', left: '300%' }
}]
}); mui.ready(function(){
h('#nava1').tap(function() {
mui.toast('123');
console.log(11);
}); h('#nava2').tap(function() {
mui.toast('456'); }); }); //用h.js时 放在上面要加mui.ready,放在下面就不用
</script>
</head> <body> <header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title">标题</h1>
</header>
<nav class="mui-bar mui-bar-tab">
<a class="mui-tab-item mui-active" id="nava1">
<span class="mui-icon mui-icon-home"></span>
<span class="mui-tab-label">首页</span>
</a>
<a class="mui-tab-item" id="nava2">
<span class="mui-icon mui-icon-phone"></span>
<span class="mui-tab-label">电话</span>
</a>
<a class="mui-tab-item" id="nava3">
<span class="mui-icon mui-icon-email"></span>
<span class="mui-tab-label">邮件</span>
</a>
<a class="mui-tab-item" id="nava4">
<span class="mui-icon mui-icon-gear"></span>
<span class="mui-tab-label">设置</span>
</a>
</nav> </body> </html>

MUI --- h.js无效的更多相关文章

  1. 偏前端 - div+mui+vue.js 制作问卷调查单页 ——题目答案由后台随机给出10道

    封装的ajax获取数据.代码可能有些是多余的,没做处理!!点击提交后有弹框,在这里我没有贴出来.第一次写博客,这些也是别人教我的,经理解后,贴出来于大家分享 ——html—— <script t ...

  2. Nginx启用Gzip压缩js无效的原因

    Nginx启用gzip很简单,只需要设置一下配置文件即可完成,可以参考文章Nginx如何配置Gzip压缩功能.不过,在群里常有人提到,他们的网站Gzip压缩虽然成功了,但检测到JS仍然没有压缩成功,这 ...

  3. MUI 里js动态添加数字输入框后,增加、减少按钮无效

    numbox 的自动初化是在 mui.ready 时完成的mui 页面默认会自动初始化页面中的所有数字输入框,动态构造的 DOM 需要进行手动初始化.比如:您动态创建了一个 ID 为 abc 的数字输 ...

  4. mui H5 js动态添加不同类型的数据

    html页面需要添加的页面的数据格式 <ul class="mui-table-view" id="OA_task_1"> <li class ...

  5. LayUI加载js无效问题

    在部署系统的时候,本地调试一切正常,layer.js均能正常加载.然而部署到服务器之后,经常性的出现layer.js无法加载问题.导致页面弹框无法使用. 一开始以为是Google浏览器问题,因为刚刚更 ...

  6. vue项目中引入mui.poppicker.js文件时报错“Uncaught ReferenceError: mui is not defined”

    解决:在mui.js的源文件后最后加上 window.mui = mui;

  7. mui longtap 事件无效

    1.mui  的部分事件默认是关闭的 需要在init中单独配置事件开关 mui.init({ gestureConfig: { longtap: true, //默认为false } })

  8. mui.min.js:7 Uncaught DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load

    mui框架做的微信公众号网页,在上传数据的时候报了这个错,async: true,//将false改为true就可以了 https://blog.csdn.net/liuzp111/article/d ...

  9. js依赖mui.css生成图片验证码

    js依赖mui.css生成图片验证码 相关css和js引入路径 https://cdnjs.cloudflare.com/ajax/libs/mui/3.7.1/css/mui.css https:/ ...

随机推荐

  1. 怎么获得当前点击的按钮的id名?

    <body> <input id="t1" type="button" value='fff'> <input id=" ...

  2. linux 常用清理或备份文件命令

    find /data/tmp/confluence/backups/ -type f -mtime +7 -exec rm -f {} \; ##查找创建超过7天的文件并强制删除 cp /data/a ...

  3. kmeans聚类源代码

    代码是在weka上二次开发的,但没有使用原来的kmeans代码,只是用了它的数据类Intances,先说下与它相关的几点东西. 一.KMeans算法简介 输入:聚类个数k,以及包含 n个数据对象的数据 ...

  4. [LeetCode] 1. Two Sum_Easy tag: Hash Table

    Given an array of integers, return indices of the two numbers such that they add up to a specific ta ...

  5. Quick Look at the Air Jordan 32

    A color with 25 years of history in the Air Jordan line will once again leave its mark on the Air Jo ...

  6. Lintcode: Find Peak Element

    There is an integer array which has the following features: * The numbers in adjacent positions are ...

  7. iqueryable lambda表达式

    1.groupby 1.group by var newLaborDtos = laborDtos.GroupBy(s => new { s.FinancingAmount, s.Company ...

  8. jstat命令查看jvm的GC情况

    jstat命令可以查看堆内存各部分的使用量,以及加载类的数量.命令的格式如下: jstat [-命令选项] [vmid] [间隔时间/毫秒] [查询次数]  注意!!!:使用的jdk版本是jdk8. ...

  9. mustache多次渲染和多个赋值

    mustache多次渲染和多个赋值, html页面的script标签中的代码,设置多个键: <!-- 项目列表 --> <script type="text/x-templ ...

  10. RHEL6.4 字符模式下安装图形界面图文教程

    本文转自:http://www.cnblogs.com/wahsonleung/p/3230325.html 第1步:当然就是启动redhat,设置映像文件. 第2步:命令行输入yum groupin ...