Commit 0fc09a70790bb52ca0c8993ecfc99fbcbd2cd9a8

Authored by liuqimichale
1 parent 47816dcf

update .gitignore

js/list.js
@@ -308,7 +308,7 @@ $(document).on('click','.out-btn',function () { @@ -308,7 +308,7 @@ $(document).on('click','.out-btn',function () {
308 308
309 }else{ 309 }else{
310 //$('.dialog-out').show() 310 //$('.dialog-out').show()
311 - window.location.href='zeroout.html' 311 + window.location.href='zeroout.html?carNumber='+carNumber
312 } 312 }
313 // alert(data.message) 313 // alert(data.message)
314 314
list.html
@@ -183,6 +183,6 @@ @@ -183,6 +183,6 @@
183 } 183 }
184 })(); 184 })();
185 </script> 185 </script>
186 -<script src="js/list.js?a=4411.31"></script> 186 +<script src="js/list.js?a=41.31"></script>
187 </body> 187 </body>
188 </html> 188 </html>
zeroout.html
@@ -106,13 +106,29 @@ @@ -106,13 +106,29 @@
106 })(); 106 })();
107 107
108 setTimeout(function () { 108 setTimeout(function () {
109 - window.location.href="list.html" 109 + window.location.href="list.html?carNumber="+getQueryString(window.location).carNumber
110 },3000) 110 },3000)
111 111
112 $('#ok-btn').on('click',function () { 112 $('#ok-btn').on('click',function () {
113 - window.location.href="list.html" 113 + window.location.href="list.html?carNumber="+getQueryString(window.location).carNumber
114 }) 114 })
115 115
  116 +function getQueryString(location) {
  117 + //var url = location.search; //获取url中"?"符后的字串
  118 + var url = location.search;
  119 + var theRequest = new Object();
  120 + if (url.indexOf("?") != -1) {
  121 + var str = url.substr(1);
  122 + strs = str.split("&");
  123 + for (var i = 0; i < strs.length; i++) {
  124 + theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
  125 + }
  126 + } else {
  127 + theRequest = null;
  128 + }
  129 + return theRequest;
  130 +}
  131 +
116 </script> 132 </script>
117 133
118 </body> 134 </body>