zoukankan      html  css  js  c++  java
  • 如何遍历div里面的文本内容,用each方法,

    如何遍历div里面的文本内容,然后进行匹配传来的数据,进行选中div,并进行CSS样式处理,

    for(i = 0; i< $(".itemMenuRowBox").children().length;i++){
    $(".itemMenuRowBox").children("div").each(function(){
    if(plate.name==$(this).text()){
    $(".itemMenuRow").css({"background-color":"#fff","color":"#000000","font-weight":"bold"});
    $(this).css({"background-color": "rgba(226, 215, 214, 0.52)","color":"#FF0000","font-weight":"bold"});
    }
    });

    1
  • 相关阅读:
    非空约束
    leetcode208
    leetcode207
    leetcode395
    leetcode116
    leetcode105
    leetcode131
    leetcode73
    leetcode200
    leetcode17
  • 原文地址:https://www.cnblogs.com/hulaoxi/p/6491879.html
Copyright © 2011-2022 走看看