temporary storage 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);} };
//List of Bindings view related information function Bindlistview (changedata) {$ (". Workor Derclass "). each (function () {$ (this). Click (function () {///Bind the order number to facilitate the use of the next page switch Tempcache.setitem ("order_function_mgr_id", $ (this). attr ("id")); Tempcache.setitem ("Order_function", "serviceorderfunction"); Tempcache.setitem ("Order_function_mgr_id_w", $ (this). attr ("id")); }); }); }
Work order display initialization information function Displayworkorder () { //binding order number to facilitate use of Var on next page switch workorderid=tempcache.getitem ("order_function_mgr_id"); Workorderid=workorderid.replace (/(^\s*) | ( \s*$)/g, ""); Tracking work Order source Functionname=tempcache.getitem ("order_function"); Functionname=functionname.replace (/(^\s*) | ( \s*$)/g, ""); if (workorderid!= ") { queryworkorderinfo (workorderid,functionname); Tempcache.removeitem ("order_function_mgr_id"); } else{ alert ("Service request failed, please try again later ....");}
$ (document). On (' Pagebeforeshow ', "#index", function () { $ (document). On (' click ', "#changePage", function () { $.mobile.changepage (' second.html ', {dataurl: ' second.html?paremeter=123 ', data: {' paremeter ': ' 123 '}, Reloadpage:f Alse, Changehash:true});}) ; $ (document). On (' Pagebeforeshow ', "#second", function () { var parameters = $ (this). "Data (" url "). Split ("? ") [1];; parameter = Parameters.replace ("parameter=", "" "); alert (parameter); });