zoukankan      html  css  js  c++  java
  • jquery mobile RedirectToAction url地址不更新

    使用asp.net mvc 和 jquery mobile 开发手机版网站

    发起一个post请求,在第一个action里做了处理,用RedirectToAction 跳转到其他action继续处理后,返回视图,这时在url上的地址还是第一个action,简单的处理办法,禁用jquery mobile的ajax加载页面的功能

       <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
            <script type="text/javascript" >
                $(document).bind("mobileinit", function () {
                    //disable ajax nav
                    $.mobile.ajaxEnabled = false;
                });
         </script>
        <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

    需要注意,这段代码要加载在引用jquery mobile前,否则无效

    介绍:

    http://www.danschnau.com/redirects-with-asp-net-mvc-and-jquery-mobile/

    其他处理办法(没太看明白):

    http://stackoverflow.com/questions/7824243/jquery-mobile-mvc-getting-the-browser-url-to-change-with-redirecttoaction

  • 相关阅读:
    2019.5.28
    蓝桥杯2017Java B组---分巧克力and承压计算
    看似忙碌的背后我都干了点什么
    3.9个人总结
    3.2个人总结
    2.23个人总结
    2.16个人总结
    2019.01.27个人总结
    1.19个人总结
    12.22个人总结
  • 原文地址:https://www.cnblogs.com/lgxtry/p/4581746.html
Copyright © 2011-2022 走看看