zoukankan      html  css  js  c++  java
  • jQuery匹配id 批量修改css属性

     1 <ul id="foreignCurrencyTree_1_ul">
     2     <li id="foreignCurrencyTree_11_li">111111</li>
     3     <li id="foreignCurrencyTree_12_li">222222</li>
     4     <li id="foreignCurrencyTree_13_li">333333</li>
     5 </ul>
     6 <ul id="foreignCurrencyTree_2_ul">
     7     <li id="foreignCurrencyTree_21_li">111111</li>
     8     <li id="foreignCurrencyTree_22_li">222222</li>
     9     <li id="foreignCurrencyTree_23_li">333333</li>
    10 </ul>
    [属性名称] 匹配包含给定属性的元素
    [att=value] 匹配包含给定属性的元素 (大小写区分)
    [att*=value] 模糊匹配
    [att!=value] 不能是这个值
    [att$=value] 结尾是这个值
    [att^=value] 开头是这个值
    [att1][att2][att3]... 匹配多个属性条件中的一个
    设置所有ul的overflow属性为hidden。
    $('[id^=foreignCurrencyTree_][id$=_ul]').css("overflow","hidden");
    设置所有li的display属性为inline
    $('[id^=foreignCurrencyTree_][id$=_li]').css("display","inline");
    设置所有ul的overflow属性为hidden。
    $('[id^=foreignCurrencyTree_][id$=_ul]').css("overflow","hidden");
    设置所有li的display属性为inline
    $('[id^=foreignCurrencyTree_][id$=_li]').css("display","inline");
  • 相关阅读:
    跨域问题
    Django缓存机制
    Django Reat Framework --- 版本控制
    Hellow!
    回忆
    突然看见新评论通知
    [退役前的小声bbbbbbbbbbbbbbbbbbbbbb]
    【题解】【CQOI2018】解锁屏幕(玄学优化)
    solution
    1009-自闭++
  • 原文地址:https://www.cnblogs.com/caixiaohua/p/7133055.html
Copyright © 2011-2022 走看看