zoukankan      html  css  js  c++  java
  • jquery mobile 带参数跳转收集(紧个人使用,测试完会补全)

    
    
    //临时存储
    var TempCache = {
        cache:function(value){
            localStorage.setItem("EasyWayTempCache",value);
        },
        getCache:function(){
            return  localStorage.getItem("EasyWayTempCache");
        },
        setItem:function(key,value){
            localStorage.setItem(key,value);
        },
        getItem:function(key){
            return localStorage.getItem(key);
        },
        removeItem:function(key){
            return localStorage.removeItem(key);
        }
    };
    
    
            //绑定视图的列表的相关的信息
            function bindListView(changeData){
                $(".workorderclass").each(function(){
                        $(this).click(function(){
                            //绑定订单的编号,便于在下一个页面切换时候使用
                            TempCache.setItem("order_function_mgr_id",$(this).attr("id"));
                            
                            TempCache.setItem("order_function","serviceOrderFunction");
                            TempCache.setItem("order_function_mgr_id_w",$(this).attr("id"));
                        });
                       
                });
            }
        //工单展示的初始化信息
        function displayWorkOrder(){
             //绑定订单的编号,便于在下一个页面切换时候使用
             var workOrderId=TempCache.getItem("order_function_mgr_id");
             workOrderId=workOrderId.replace(/(^s*)|(s*$)/g,"");
             //追踪工单来源
              functionName=TempCache.getItem("order_function");
              functionName=functionName.replace(/(^s*)|(s*$)/g,"");
              
             if(workOrderId!=''){
                 queryWorkOrderInfo(workOrderId,functionName);
    TempCache.removeItem("order_function_mgr_id");         }else{
                 alert("服务请求失败,请稍候再试....");
             }
        }
    
    
    
    
    
    $(document).on('pagebeforeshow', "#index",function () {
                $(document).on('click', "#changePage",function () {     
                    $.mobile.changePage('second.html', { dataUrl : "second.html?paremeter=123", data : { 'paremeter' : '123' }, reloadPage : false, changeHash : true });
                }); 
            }); 
     
            $(document).on('pagebeforeshow', "#second",function () {
                var parameters = $(this).data("url").split("?")[1];;
                parameter = parameters.replace("parameter=","");  
                alert(parameter);
            });    
    
    
    

      

    
    
  • 相关阅读:
    生信入门-爱课程上的华中农业大学
    PAT 1115 Counting Nodes in a BST[构建BST]
    PAT 1133 Splitting A Linked List[链表][简单]
    PAT 1037 Magic Coupon[dp]
    PAT 1033 To Fill or Not to Fill[dp]
    畅通工程续 HDU1874
    Free DIY Tour HDU1224
    六度分离 HDU1869
    Arbitrage HDU1217
    floyed算法
  • 原文地址:https://www.cnblogs.com/Stephenchao/p/3928094.html
Copyright © 2011-2022 走看看