zoukankan      html  css  js  c++  java
  • jQuery作用

    jquery是前端里面比较总要的,是很强大的一个选择器。

     表单:
    1、$(":input") 查找所有的input元素
    2、$("text")    匹配所有的单行文本框
    3、$(":password") 匹配所有密码框
    4、$("radio")   匹配所有单选按钮
    5、$("checkbox") 匹配所有复选框
    6、$("submit")   匹配所有提交按钮
    7、$("image")    匹配所有图像域
    8、$("button")   匹配所有按钮
    9、$("file")     匹配所有文件域

    10、$("hidden") 匹配所有不可见元素,或者type为hidden的元素

     1、$("#id"): 根据给定的ID匹配一个元素。

       2、$("dom元素名"):根据给定的元素名匹配所有元素

       3、$(".Class类名"): 根据给定的类匹配元素。

       4、$("*") :匹配所有元素。

       5、$("dom元素.class类名"):选择所有class属性为指定类名的dom元素。

       6、$(".stripe tr"): 获取class属性为stripe的table元素下的所有行

    层级:
       1、$("ancestor descendant"):在给定的祖先元素下匹配所有的后代元素

       2、$("parent > child"):在给定的父元素下匹配所有的子元素

       3、$("prev + next"):匹配所有紧接在 prev 元素后的 next 元素

       4、$("prev ~ siblings"):匹配 prev 元素之后的所有 siblings(同级) 元素

  • 相关阅读:
    爬虫基础
    设计BBS
    中间件和auth模块
    git
    分页器与form表单
    cookie与session
    springboot2.x基础教程:@Enable原理
    springboot2.x基础教程:@Scheduled开启定时任务及源码分析
    springboot2.x基础教程:@Async开启异步任务
    springboot2.x基础教程:JRebel实现SpringBoot热部署
  • 原文地址:https://www.cnblogs.com/miaozhicheng/p/4963478.html
Copyright © 2011-2022 走看看