JQuery mobile - ChangePage 结果出现白屏,并显示 "Undefined"

标签 jquery jquery-mobile

几天来我一直遇到一个问题,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:

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/

相关文章:

jquery - 让 jQuery-Mobile 与 webpack 一起工作

javascript - jQuery Mobile - slider 无法移动

c# - 通过 jQuery 计算 Facebook、Twitter、Google+ 分享的不同方法?

javascript - 使用带有 Backbone.js 的 POST 方法发送数据

javascript - 你如何在 jQuery/Javascript 中编写 CSS?

jquery - 什么时候应该使用 jQuery Mobile?正确的 "Use Case"是什么?

javascript - jQuery - 选择器。选择子div并找到背景图片

javascript - javascript 遇到问题并使其与我现有的代码一起工作

jquery-mobile - jQuery Mobile 默认选项卡

html - jquery mobile 中的两个输入字段