几天来我一直遇到一个问题,changePage 函数会导致右上角未定义的白色页面。我最初遇到一个问题,URL 中的括号导致 JQuery 中断 - 我发现了一个 issue与此相关的和已接受的solution 。目前我的changePage 函数如下所示(请注意,在 URL 问题之前它一直有效到 alpha 3 版本):
$.mobile.changePage("xd02main.do",
{type: "get",
data: dataString});
我得到的结果是它成功更改了页面(结果页面显示),然后立即切换到白色未定义页面(不知道为什么!)。不幸的是,我无法显示屏幕截图,因为我是新来的:(。任何建议都会很棒!如果有人有任何其他问题,请告诉我,如果需要,我可以为您提供更多信息。
最佳答案
也许这有帮助?
http://api.jquerymobile.com/jQuery.mobile.changePage/
options
Type: Object
Properties:
block 引用> block 引用>allowSamePageTransition (default: false)
Type: Boolean
By default, changePage() ignores requests to change to the current active page. Setting this option to true, allows the request to execute. Developers should note that some of the page transitions assume that the fromPage and toPage of a changePage request are different, so they may not animate as expected. Developers are responsible for either providing a proper transition, or turning it off for this specific case.
如果这不能解决您的问题。也许您在加载第二页时会触发某种脚本?
关于JQuery mobile - ChangePage 结果出现白屏,并显示 "Undefined",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9230441/