leftmenu.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <style>
  6. body {
  7. margin: 0;
  8. padding: 0;
  9. background-color: #5394cc;
  10. width: 100%;
  11. font-size: 16px;
  12. }
  13. ul {
  14. list-style-type: none;
  15. margin: 0;
  16. padding: 0;
  17. width: 100%;
  18. background-color: #5394cc;
  19. }
  20. li a {
  21. display: block;
  22. color: white;
  23. padding: 8px 16px;
  24. text-decoration: none;
  25. }
  26. li a.active {
  27. background-color:rgb(39, 148, 190);
  28. color: white;
  29. }
  30. li a:hover:not(.active) {
  31. background-color: rgb(118, 153, 228);
  32. color: white;
  33. }
  34. .active {
  35. background-color: rgb(76, 109, 201);
  36. color: white;
  37. }
  38. .now{ color:#fc9d00;}
  39. </style>
  40. </head>
  41. <body valign="top">
  42. <ul>
  43. <li><a href="main.html" target="main">主页</a></li>
  44. <li><a href="station.html" target="main">站点信息</a></li>
  45. <li><a href="record.html" target="main">加油数据</a></li>
  46. <li><a href="envir.html" target="main">环境数据</a></li>
  47. <li><a href="warning.html" target="main">报警数据</a></li>
  48. <li><a href="config.html" target="main">配置数据</a></li>
  49. <li><a href="offline.html" target="main">离线记录</a></li>
  50. <!--<li><a href="error.html" target="main">故障数据</a></li>-->
  51. <li><a href="summary.html" target="main">数据统计</a></li>
  52. </ul>
  53. <script type="text/javascript">
  54. var oLis=document.getElementsByTagName("li");
  55. var i,j;
  56. var length=oLis.length;
  57. for(i=0;i<length;i++){
  58. oLis[i].onclick=function(){
  59. for(j=0;j<length;j++){
  60. oLis[j].className="";
  61. }
  62. this.className+="active";
  63. }
  64. }
  65. </script>
  66. <script>
  67. function onclick() {
  68. //var selectionObj = window.getSelection();
  69. //var selectedText = selectionObj.toString();
  70. alert(selectedText);
  71. }
  72. </script>
  73. <script>
  74. function onclick2() {
  75. var selectionObj = window.getSelection();
  76. var selectedText = selectionObj.toString();
  77. alert(selectedText)
  78. //window.location.target="main";
  79. //window.location.href='record.html';
  80. window.open("record.html", "main")
  81. // window.location.
  82. }
  83. </script>
  84. </body>
  85. </html>