定义了列表,想点一列表出一个提示,结果每次都是出现两次,实在找不到错在哪了,请大家帮看看..
<body>
<div class="mui-card">
<ul class="mui-table-view mui-table-view-chevron">
<li class="mui-table-view-cell mui-collapse mui-active">
<a class="mui-navigate-right" >基本资料</a>
<ul class="mui-table-view mui-table-view-chevron">
<li class="mui-table-view-cell">
<a nameis="cx-sp.html">商品</a>
</li>
<li class="mui-table-view-cell">
<a nameis="cx-kh.html" href="#">客户</a>
</li>
</ul>
</li>
</ul>
</div>
<script src="../js/mui.min.js"></script>
<script type="text/javascript">
mui.init()
mui('.mui-table-view-cell').on('tap', '[nameis]', function(e) {
alert(this.getAttribute('nameis'));
});
</script>
</body>
2 个回复
Danny - QQ125904483
mui js被引用了两次
7***@qq.com (作者)
我没发现哪里引用两次,目前只得给按钮加ID,用原始办法了,这样就正常了