1

假设我在 example.com 上有一个网站

它包含两个本地视图,“数据库”和“年份”

最初,加载数据库视图。

用户导航到“年”视图。

地址栏(至少在 android 2.3 中)现在显示为 example.com#Year

然后用户决定出于任何原因刷新页面。

地址 example.com#Year 被刷新,用户会看到一个空白的白色屏幕。

有人对如何处理这种情况有任何建议吗?显然,无论用户在哪个视图,如果刷新,我希望它显示..

谢谢!

更新:

这是一些有助于描述我的问题的代码:

html:

<div data-role="view" id="Database">
    <div data-role="content">
        <p><strong>This is the Database view</strong></p>
        <a data-role="button" id="databaseButton" href="#Year">Go to Year View</a>
    </div>
</div>

<div data-role="view" id="Year">
    <div data-role="content">
        <p><strong>This is the Year view</strong></p>
        <a data-role="button" id="yearButton">Refresh Page</a>
    </div>
</div>​

脚本:

var app = new kendo.mobile.Application($(document).body, {
    initial: "Database"
});

$("#yearButton").click(function() {
    // location.reaload();
    // cannot simulate page refresh by the user in jsfiddle

    // the current browser address is example.com/index.html#Year
    // reloading this address produces a blank white screen
    // because of the #Year parameter
});

http://jsfiddle.net/VUN3g/16/

4

1 回答 1

1

您能否确认您使用的是最新版本的 Kendo UI (2012.3.1114) 和 jQuery 1.8.2?

我无法使用您的代码复制问题并使用以下 URL 在 Android 2.3 上进行测试...

http://jsbin.com/aqireb/1

于 2013-01-03T20:06:13.407 回答