| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="format-detection" content="telephone=no">
- <meta http-equiv="X-UA-Compatible" content="chrome=1" >
- <style>
- *{
- outline: 0;
- padding: 0;
- margin: 0;
- border: none;
- box-sizing: border-box;
- background-size: contain;
- background-position: center;
- background-repeat: no-repeat;
- }
- ul,ol{
- list-style: none outside none;
- }
- ul.product-info {
- padding: 20px;
- }
- ul.product-info > li {
- line-height: 30px;
- font-size: 14px;
- }
- </style>
- </head>
- <body>
- <ul class="product-info">
- <li>
- <label for="">名 称:</label>
- <span id="name">-</span>
- </li>
-
- <li>
- <label for="">编 码:</label>
- <span id="code">-</span>
- </li>
- <li>
- <label for="">统一信用代码:</label>
- <span id="unifiedSocialCreditCode">-</span>
- </li>
- <li>
- <label for="">地址:</label>
- <span id="addr">-</span>
- </li>
-
-
- </ul>
- </body>
- <script>
- function str_to_obj(str){
- var obj = {};
- var temp = str.split('&');
- for(var i = 0; i < temp .length;i++) {
- var t = temp[i].split('=');
- obj[t[0]]=t[1];
- }
- return obj
- }
-
- var queryObj = str_to_obj(window.location.search.substring(1));
- let ids=['name','code','unifiedSocialCreditCode','addr']
- ids.forEach(id=>{
- if(queryObj[id]){
- document.querySelector('#'+id).innerHTML = decodeURIComponent(queryObj[id]);
- }
- })
-
- </script>
- </html>
|