homepage.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>主页</title>
  8. <link rel="stylesheet" href="./public/css/uform.css">
  9. <link rel="stylesheet" href="./public/css/index.css">
  10. <link href="./public/images/logo.png" rel="shortcut icon">
  11. </head>
  12. <body>
  13. <section class="CampusInfo-Pagehome">
  14. <div class="CampusInfoSeach">
  15. <a href="https://www.baidu.com">
  16. <img src="./public/images/homepage/bd_logo.png" alt="logo">
  17. </a>
  18. <div class="CampusInfoWrap">
  19. <span class="icon"></span>
  20. <input type="text" class="search" maxlength="100" autocomplete="off" onkeydown="enter()">
  21. <span class="s_btn">
  22. <input type="submit" value="百度一下" class="sm_btn" onclick="openNewpage()">
  23. </span>
  24. </div>
  25. </div>
  26. <div class="CampusInfoProduct">
  27. <ul>
  28. <li>
  29. <a href="">
  30. <img src="./public/images/homepage/product_1.png" alt="产品">
  31. </a>
  32. </li>
  33. <li>
  34. <a href="">
  35. <img src="./public/images/homepage/product_2.png" alt="产品">
  36. </a>
  37. </li>
  38. <li>
  39. <a href="">
  40. <img src="./public/images/homepage/product_3.png" alt="产品">
  41. </a>
  42. </li>
  43. <li>
  44. <a href="">
  45. <img src="./public/images/homepage/product_4.png" alt="产品">
  46. </a>
  47. </li>
  48. <li>
  49. <a href="">
  50. <img src="./public/images/homepage/product_5.png" alt="产品">
  51. </a>
  52. </li>
  53. <li>
  54. <a href="">
  55. <img src="./public/images/homepage/product_6.png" alt="产品">
  56. </a>
  57. </li>
  58. <li>
  59. <a href="">
  60. <img src="./public/images/homepage/product_7.png" alt="产品">
  61. </a>
  62. </li>
  63. <li>
  64. <a href="">
  65. <img src="./public/images/homepage/product_8.png" alt="产品">
  66. </a>
  67. </li>
  68. </ul>
  69. </div>
  70. </section>
  71. <script>
  72. var search = document.querySelector(".search");
  73. openNewpage=function(){
  74. window.location.href ="https://www.baidu.com/s?wd="+search.value+""
  75. }
  76. enter=function(){
  77. if(event.keyCode==13)
  78. {
  79. openNewpage();
  80. }
  81. }
  82. </script>
  83. </body>
  84. </html>