开发者

Redirect to home page

Is it possible to 开发者_JAVA百科"redirect" users from a subpage ie. index.htm#sub-page to index.htm#home with the mobileinit function?

$(document).bind("mobileinit", function(){
    $.mobile.changePage("/index.htm#home");
});


And why not

$(document).bind("mobileinit", function(){
    document.location.href="whereever";
});

or just

<script>
document.location.href="whereever";
</script>

or even with a metatag?


$.mobile.changePage('#page_two');

This one worked for me.


Yes. If you use redirect, the non-ajax web page must reload more than 100KB of JQuery JS.... I still don't want to, but in some cases it must be done by page reload (to handle the PHP Session carefully).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜