代码如下:
<!--这里放置真实显示的DOM内容-->
<!--indus-->
<ul class="mui-table-view mui-grid-view">
<h2 align="center" style="padding-top:9px ;margin-bottom: 0;margin-top: 0;;">Industry</h2>
<li class="mui-table-view-cell mui-media mui-col-xs-6">
<a href="Aerospace.html" id="aerospace">
<img class="mui-media-object" src="img/air.jpg">
<div class="mui-media-body">Aerospace&Defense</div>
</a>
</li>
<li class="mui-table-view-cell mui-media mui-col-xs-6">
<a href="#">
<img class="mui-media-object" src="img/consumer.png">
<div class="mui-media-body">Consumer</div>
</a>
</li>
<li class="mui-table-view-cell mui-media mui-col-xs-6">
<a href="#">
<img class="mui-media-object" src="img/electricity.jpg">
<div class="mui-media-body">Energy&Utilities</div>
</a>
</li>
<li class="mui-table-view-cell mui-media mui-col-xs-6">
<a href="#">
<img class="mui-media-object" src="img/Medical.jpg">
<div class="mui-media-body">Healthcare</div>
</a>
</li>
<li class="mui-table-view-cell mui-media mui-col-xs-6">
<a href="#">
<img class="mui-media-object" src="img/trans.jpg">
<div class="mui-media-body">Transportation</div>
</a>
</li>
<li class="mui-table-view-cell mui-media mui-col-xs-6">
<a href="#">
<img class="mui-media-object" src="img/pic3.jpg">
<div class="mui-media-body">Automotive</div>
</a>
</li>
<li class="mui-table-view-cell mui-media mui-col-xs-6">
<a href="#">
<img class="mui-media-object" src="img/pic31.jpg">
<div class="mui-media-body">Industrial</div>
</a>
</li>
<li class="mui-table-view-cell mui-media mui-col-xs-6">
<a href="#">
<img class="mui-media-object" src="img/pic4.jpg">
<div class="mui-media-body">Others</div>
</a>
</li>
</ul>
<a href="Aerospace.html">test</a>
<!--indus--over-->
</body>
<script src="js/mui.min.js"></script>
<script>
mui.init();
document.getElementById('aerospace').addEventListener('tab', function(){
mui.openWindow({
url : 'Aerospace.html',
id : 'aero'
})
});
mui('.mui-scroll-wrapper').scroll({
deceleration: 0.0007 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
});
</script>
</html>
4 个回复
giddens
document.getElementById('aerospace').addEventListener('tab', function(){
mui.openWindow({
url : 'Aerospace.html',
id : 'aero'
})
});
改成
document.getElementById('aerospace').addEventListener('tab', function(){
mui.openWindow({
url : 'Aerospace.html',
})
});
试试 我怀疑你webview的id不对
4***@qq.com
addEventListener('tab', function(){
!!!!! tab还是tap- -!!!!!
x***@163.com
我的眼....
1***@qq.com
是tap不是tab,然后再看一下url和id有没有写错。