1234567891011121314151617181920212223242526272829303132333435363738 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta content="yes" name="apple-mobile-web-app-capable">
- <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"/>
- <title>花江湖</title>
- <link rel="stylesheet" href="./common/reset.css">
- <style>
- html,body {
- min-height: 100vh;
- }
- img {
- width: 100%;
- float: left;
- }
- </style>
- </head>
- <body>
- <img id="img" src="" alt="">
- <script src="./common/jquery-2.1.0.js"></script>
- <script>
- var params=parseQueryString(location.href)
- document.title=params.title?params.title:"花江湖"
- $("img").attr("src",params.image)
- $("body")[0].style.backgroundColor=params.color
- //获取地址栏参数
- function parseQueryString(url) {
- var urlObj = {};
- var reg = /([^?=&]+)=([^?=&]+)/g;
- url.replace(reg, function($0, $1, $2) {
- urlObj[$1] = decodeURIComponent($2);
- })
- return urlObj;
- }
- </script>
- </body>
- </html>
|