我正面临着一些jquery mobile的问题。当我从第一页移动到第二页时,它没有显示第二页,因为我每次都需要刷新页面。它最初似乎缺少一些CSS类。我不明白为什么会发生这种事。
我使用http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css作为CSS
http://code.jquery.com/jquery-1.6.4.min.js
http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js作为JS。
在同一页上,我有这个锚标签
<a href="" onClick="showText()">showText</a>showText()方法不会第一次调用,并显示javascript错误showText未定义,但当我刷新页面时,它工作正常。
发布于 2012-03-05 07:29:08
这不是一个解决方案,但它可以解决我的问题。
通过使用表单post而不是锚链接,我设法阻止了缓存页面的加载。
<!-- <a href="index.php?p=6_2" data-role="none"><img src="images/large_red_arrow.png" /></a> -->
<form action="index.php?p=6_2" method="post" data-ajax="false">
<input data-role="none" id="view-button" value="view" name="view" type="image" src="images/large_red_arrow.png" alt="View"/>
</form>https://stackoverflow.com/questions/8722606
复制相似问题