index.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>首页</title>
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
  9. <link>
  10. <style>
  11. .box{width:1200px;height:960px;}
  12. .header{width:100%;background:rgba(0, 3, 143, 1);color:white;padding: 1px;}
  13. .content{width:100%;height:800px;box-sizing: content-box;border: 1px solid;}
  14. .left{
  15. float:left;
  16. width:15%;
  17. height:100%;
  18. background:rgba(242, 242, 242, 1);
  19. }
  20. .left p{
  21. width: 100%;
  22. text-align: center;
  23. font-size: 18px;
  24. color: #797979;
  25. }
  26. .show button{
  27. margin-top: 3%;
  28. color: white;
  29. background: rgba(22, 155, 213, 1);
  30. width: 6%;
  31. border-radius: 5px;
  32. margin-left: 3%;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <div class="box">
  38. <div class="header"><h1>微博数据分析</h1></div>
  39. <div class="content">
  40. <div class="left">
  41. <p><span style="background:rgb(215,215,215)"; onclick="changeIframe(this,'./html/WBAccount')">微博号管理</span></p>
  42. <p><span onclick="changeIframe(this,'./html/WBData')">微博数据分析</span></p>
  43. <p><span onclick="changeIframe(this,'./html/Comment')">微博评论爬虫</span></p>
  44. </div>
  45. <div class="right">
  46. <iframe src="./html/WBAccount.html" frameborder="0" style="
  47. height: 800px;
  48. width: 85%;"></iframe>
  49. </div>
  50. </div>
  51. </div>
  52. </body>
  53. </html>
  54. <script>
  55. changeIframe=function(wt,el){
  56. let span=$("span");
  57. for(let i=0;i<span.length;i++){
  58. span[i].style.background="rgba(242, 242, 242, 1)";
  59. }
  60. wt.style.background="rgb(215,215,215)";
  61. let _href=el+".html";
  62. let iframe=$("iframe")[0];
  63. iframe.src=_href;
  64. }
  65. </script>