<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<title>JQ判断某个div是否含有某个div样式</title>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<style>
    .lala{
        color:red;
        margin:10vh;
        cursor:pointer;
    }
</style>
<div class="lala noStyle">
    <span class="number">89</span>
    <span class="heart"></span>
</div>
 </body>
 </html>
 <script>
    $(function(){
        if($(".lala").css('color')=="rgb(255, 0, 0)"){
            alert(000)
        }
    })
</script>

 

相关文章:

  • 2021-07-08
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2021-11-07
  • 2021-06-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案