Aucune description

action.html 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta content="yes" name="apple-mobile-web-app-capable">
  6. <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"/>
  7. <title>花江湖</title>
  8. <link rel="stylesheet" href="./common/reset.css">
  9. <style>
  10. html,body {
  11. min-height: 100vh;
  12. }
  13. img {
  14. width: 100%;
  15. float: left;
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. <img id="img" src="" alt="">
  21. <script src="./common/jquery-2.1.0.js"></script>
  22. <script>
  23. var params=parseQueryString(location.href)
  24. document.title=params.title?params.title:"花江湖"
  25. $("img").attr("src",params.image)
  26. $("body")[0].style.backgroundColor=params.color
  27. //获取地址栏参数
  28. function parseQueryString(url) {
  29. var urlObj = {};
  30. var reg = /([^?=&]+)=([^?=&]+)/g;
  31. url.replace(reg, function($0, $1, $2) {
  32. urlObj[$1] = decodeURIComponent($2);
  33. })
  34. return urlObj;
  35. }
  36. </script>
  37. </body>
  38. </html>