温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

使用jquery怎么对hash进行遍历

发布时间:2021-04-06 17:25:57 阅读:197 作者:Leah 栏目:web开发
前端开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

使用jquery怎么对hash进行遍历?很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

具体如下:

<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>运维平台</title>
  <style type="text/css">
    *{margin0padding0;}
    body{font-size20pxcolor#333;}
     h2{position: relative; height100pxline-height100pxmargin0background#555color#f2f2f2font-size25pxtext-align: center;}
    ul,ol,li{list-style-type: none;}
    #list{
      margin0 auto;
      padding-top4px;
    }
    #list ul{
      display: flex;
      flex-wrap: wrap;
      margin-top30px;
    }
 /*+设置框框大小 */
    #list li{
      flex1;
      min-width100px;
      min-height50px;
      margin2px 4px;
      padding5px 10px;
      border1px solid #eee;
    }
    #list .name{
      font-weight: bold;
      font-size20px;
    }
    #list .red{
      color#fff;
      font-weight: bold;
      background#f00;
      backgroundrgba(255,0,0,.8);
    }
    #list .red p span{
      color#fff;
    }
    #list .yellow{
      font-weight: bold;
      background#ff0;
      backgroundrgba(255,255,0,.8);
    }
    #list .green{
      background#0f0;
      backgroundrgba(0,255,0,.8);
    }
    #list .died{
      background#666;
      backgroundrgba(162,162,162,.8);
      color#fff;
    }
    #list p{
      padding-top3px;
    }
    #list p span{
      color#f00;
      font-weight: bold;
    }
    .time{
      position: absolute; top0pxright20px;
      color#fff;
      font-size25px;
    }
  </style>
</head>
<body>
  <h2>泰隆银行DB运行监控/60s<span class="time"></span></h2>
  <ul id="list"></ul>
  <!-- <script src="http://libs.mingsixue.com/jquery/1.12.4/jquery.min.js"></script> -->
  <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
  <script>
  $(function(){
    var renderTime = function() {
      var now = new Date();
      var y = now.getFullYear();
      var m = now.getMonth() + 1;
      var d = now.getDate();
      var h = now.getHours();
      var i = now.getMinutes();
      var s = now.getSeconds();
      m = m < 10 ? '0' + m : m;
      d = d < 10 ? '0' + d : d;
      h = h < 10 ? '0' + h : h;
      i = i < 10 ? '0' + i : i;
      s = s < 10 ? '0' + s : s;
      var _date = y + '-' + m + '-' + d;
      var _time = h + ':' + i + ':' + s;
      $('.time').html(_date + ' ' + _time);
    };
   var render = function(data) {
   console.log('111111111111111111111');
  console.log(data);
  console.log('111111111111111111111');
  for (var k in data){
   console.log('222222222222222222222');
  console.log(k+'=>'+data[k]);
  console.log(data[k]);
  console.log('222222222222222222222');
  for (var p in data[k]){
   console.log('3333333333333333333333');
   console.log(p+'=>'+data[k][p]);
   console.log('3333333333333333333333');
  };
  };
  };
  var getOracleService = function(error) {
      $.ajax({
        url'/returnmq/',
        type'GET',
        data: {},
        asyncfalse,
        dataType'json',
        successfunction(res) {
          render(res);
        },
        errorfunction(res) {
         //  alert("数据返回出错");
        }
      });
    }
    getOracleService();
 });
  </script>
</body>
</html>

使用jquery怎么对hash进行遍历

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注亿速云行业资讯频道,感谢您对亿速云的支持。

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI

开发者交流群×