zoukankan      html  css  js  c++  java
  • jQuery选择器

    jQuery  选择器基于元素的  id  、类  、类型  、属性  、 属性值等  “查找”(或选择) HTML元素,它基于已存在的  CSS  选择器。

    jQuery  中的所有选择器都是以美元符号开头:  $()。

    元素选择器:$("p")。

    #id  选择器:$("#test")。

    .class  选择器:$(".test")。

    也可以像  css  那样选择元素:

    • $("*") :选取所有元素
    • $(this) : 选取当前  HTML  元素
    • $("p.test") :选取  class  为  test  的  <p>  元素
    • $("p:first") :选取第一个  <p>  元素
    • $("[href]") :选取带有  href  属性的元素
    • $("a[target = '_blank']") :选取所有  target  属性值等于 “_blank” 的 <a> 元素
    • $(":button") :选取所有  type = “button” 的  <input>  元素

    .....

  • 相关阅读:
    linux中read用法
    apt-get 使用指南
    linux文件系统
    KMP
    在C#中的各种应用
    A*算法,遗传算法
    Dijkstra算法,Floyd算法
    AE开发tips
    TOC 右键菜单
    ubuntu下的一些意外
  • 原文地址:https://www.cnblogs.com/mwxz/p/13527675.html
Copyright © 2011-2022 走看看