From 0fc09a70790bb52ca0c8993ecfc99fbcbd2cd9a8 Mon Sep 17 00:00:00 2001 From: liuqimichale <123456lq> Date: Thu, 14 Nov 2019 23:00:01 +0800 Subject: [PATCH] update .gitignore --- js/list.js | 2 +- list.html | 2 +- zeroout.html | 20 ++++++++++++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/js/list.js b/js/list.js index 99f9aac..d88f9ed 100644 --- a/js/list.js +++ b/js/list.js @@ -308,7 +308,7 @@ $(document).on('click','.out-btn',function () { }else{ //$('.dialog-out').show() - window.location.href='zeroout.html' + window.location.href='zeroout.html?carNumber='+carNumber } // alert(data.message) diff --git a/list.html b/list.html index e077ade..1effdc0 100644 --- a/list.html +++ b/list.html @@ -183,6 +183,6 @@ } })(); - + diff --git a/zeroout.html b/zeroout.html index 3b3fa5e..2be3b7c 100644 --- a/zeroout.html +++ b/zeroout.html @@ -106,13 +106,29 @@ })(); setTimeout(function () { - window.location.href="list.html" + window.location.href="list.html?carNumber="+getQueryString(window.location).carNumber },3000) $('#ok-btn').on('click',function () { - window.location.href="list.html" + window.location.href="list.html?carNumber="+getQueryString(window.location).carNumber }) +function getQueryString(location) { + //var url = location.search; //获取url中"?"符后的字串 + var url = location.search; + var theRequest = new Object(); + if (url.indexOf("?") != -1) { + var str = url.substr(1); + strs = str.split("&"); + for (var i = 0; i < strs.length; i++) { + theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]); + } + } else { + theRequest = null; + } + return theRequest; +} + -- libgit2 0.21.4