PhoneGap中文网
标题:
页面切换问题
[打印本页]
作者:
sjygive
时间:
2014-8-12 08:37
标题:
页面切换问题
本帖最后由 sjygive 于 2014-8-14 08:33 编辑
切换顺序为A->B->C,如果A和B的Panel有相同触摸跳转的区域,在安卓上,正常情况是点击A的跳转区域跳转到B panel,但有时会触发到B相同区域的跳转,自动跳到C panel,在苹果上就没有发生过,请问有没有人遇到相同的问题,有好的解决方法吗,小菜鸟谢谢了!
补充一句:这个问题是在真机测试才会出现的
整理了问题代码并附上:(主要是从A跳转到B时,有时自动触发到B界面里面的第一个li标签里的onclick时间)
<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
<title>test</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" />
<link rel="stylesheet" type="text/css" href="css/icons.css" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="css/appframework.css" />
<link rel="stylesheet" type="text/css" href="css/lists.css" />
<link rel="stylesheet" type="text/css" href="css/forms.css" />
<link rel="stylesheet" type="text/css" href="css/buttons.css" />
<link rel="stylesheet" type="text/css" href="css/badges.css" />
<link rel="stylesheet" type="text/css" href="css/grid.css" />
<link rel="stylesheet" type="text/css" href="plugins/css/af.actionsheet.css" />
<link rel="stylesheet" type="text/css" href="plugins/css/af.popup.css" />
<link rel="stylesheet" type="text/css" href="plugins/css/af.scroller.css" />
<link rel="stylesheet" type="text/css" href="plugins/css/af.selectBox.css" />
<script type="text/javascript" charset="utf-8" src="js/appframework.js"></script>
<script type="text/javascript" charset="utf-8" src="./plugins/af.actionsheet.js"></script>
<script type="text/javascript" charset="utf-8" src="./plugins/af.css3animate.js"></script>
<script type="text/javascript" charset="utf-8" src="./plugins/af.passwordBox.js"></script>
<script type="text/javascript" charset="utf-8" src="./plugins/af.scroller.js"></script>
<script type="text/javascript" charset="utf-8" src="./plugins/af.selectBox.js"></script>
<script type="text/javascript" charset="utf-8" src="./plugins/af.touchEvents.js"></script>
<script type="text/javascript" charset="utf-8" src="./plugins/af.touchLayer.js"></script>
<script type="text/javascript" charset="utf-8" src="./plugins/af.popup.js"></script>
<script type="text/javascript" charset="utf-8" src="./ui/appframework.ui.js"></script>
<script type="text/javascript" charset="utf-8" src="./ui/transitions/fade.js"></script>
<script type="text/javascript" charset="utf-8" src="./ui/transitions/flip.js"></script>
<script type="text/javascript" charset="utf-8" src="./ui/transitions/pop.js"></script>
<script type="text/javascript" charset="utf-8" src="./ui/transitions/slide.js"></script>
<script type="text/javascript" charset="utf-8" src="./ui/transitions/slideDown.js"></script>
<script type="text/javascript" charset="utf-8" src="./ui/transitions/slideUp.js"></script>
<script type="text/javascript" charset="utf-8" src="./plugins/af.slidemenu.js"></script>
</head>
<body>
<div id="afui">
<div id="content">
<div title="A" id="gongneng" class="panel" selected="true">
<div style="margin:5px auto; width: 25%; float:left;">
<center>
<a href="#buildfilehistory" style="text-decoration: none;">
<img src="" style="width: 50px;">
<font style="font-size: 15px; color: #9A9495;">aaaa</font>
</a>
</center>
</div>
</div>
<div title='B' id="buildfilehistory" class="panel">
<ul>
<li>
<div onclick='alert("1");javascript:$.ui.loadContent("#buildfile",false,false,"slide");'>
<div>
<a class="icon info big"></a>
</div>
<div style="float:left;">
<p>
<font>aaa:</font>
<font>bbbb</font>
</p>
<p>
<font>ccc:</font>
<font>sssss</font>
</p>
</div>
<div style="clear: both;"></div>
</div>
</li>
<li>
<div onclick='alert("2");javascript:$.ui.loadContent("#buildfile",false,false,"slide");'>
<div>
<a class="icon info big"></a>
</div>
<div style="float:left;">
<p>
<font>aaa:</font>
<font>bbbb</font>
</p>
<p>
<font>ccc:</font>
<font>sssss</font>
</p>
</div>
<div style="clear: both;"></div>
</div>
</li>
<li>
<div onclick='alert("3");javascript:$.ui.loadContent("#buildfile",false,false,"slide");'>
<div>
<a class="icon info big"></a>
</div>
<div style="float:left;">
<p>
<font>aaa:</font>
<font>bbbb</font>
</p>
<p>
<font>ccc:</font>
<font>sssss</font>
</p>
</div>
<div style="clear: both;"></div>
</div>
</li>
</ul>
</div>
<div title='C' id="buildfile" class="panel">
<div>
这里是C界面
</div>
</div>
</div>
</body>
</html>
作者:
admin
时间:
2014-8-12 20:31
亲 你使用的是什么框架
作者:
sjygive
时间:
2014-8-13 08:26
appframework
作者:
sjygive
时间:
2014-8-13 08:27
admin 发表于 2014-8-12 20:31
亲 你使用的是什么框架
appframework
欢迎光临 PhoneGap中文网 (http://bbs.phonegap100.com/)
Powered by Discuz! X3.2