zoukankan      html  css  js  c++  java
  • jquery attribute选择器 语法

    jquery attribute选择器 语法

    作用:[attribute] 选择每个带有指定属性的元素。可以选取带有任何属性的元素(对于指定的属性没有限制)。

    语法:$("[attribute]")

    参数:attribute    必需。规定要查找的属性。  大理石量具哪家好  

    jquery attribute选择器 示例

    <html>
    <head>
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script type="text/javascript"> 
    $(document).ready(function(){
        $("[id]").css("background-color","#B2E0FF");
    });
    </script>	
    </head>
    <body>
    <html>
    <body>
    <h1 id="main_header">Welcome to My Homepage</h1>
    <p class="intro">My name is Donald</p>
    <p>I live in Duckburg</p>
    <p>My best friend is Mickey</p>
    <h3 id="sub_header">My uncle is Scrooge</h3>
    <div id="choose">
    Who is your favourite:
    <ul>
    <li>Goofy</li>
    <li>Mickey</li>
    <li>Pluto</li>
    </ul>
    </div>
    </body>
    </html>
    </body>
    </html>
  • 相关阅读:
    codevs 2833 奇怪的梦境
    codevs 3058 寻找sb5
    codevs 2989 寻找somebody
    并查集
    排列组合
    序章
    [POJ2625][UVA10288]Coupons
    2017NOIP模拟赛-科普基地
    AIM Tech Round 5 (rated, Div. 1 + Div. 2)
    浙江十套
  • 原文地址:https://www.cnblogs.com/furuihua/p/11942097.html
Copyright © 2011-2022 走看看