zoukankan      html  css  js  c++  java
  • jQuery 基础

    jQuery全局命名空间中定义的唯一两个变量  jQuery $

    $(document).ready(fn);//== 在DOMContentLoaded时触发,浏览器不支持时,会在load时触发
    $(fn)
    jQuery.noConflict();//还原$()为初始值

     jQuery对象返回的类数组对象,拥有length属性,包含selector(选择字符串),context(对象上下文),jquery(jQuery版本号,用于区分jquery对象)

    常见API

    .each(): Iterate over a jQuery object, executing a function for each matched element.

    在回调函数中调用return false来终止循环

    .map() Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.

    .index() : Search for a given element from among the matched elements.

     If the element is not found, .index() will return -1.

    is() : Check the current matched the set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.

  • 相关阅读:
    【数据库领域】mysql中in与or对比
    数据库优化
    数据库-索引
    数据库-事务
    数据库-视图
    数据库设计
    数据库编程提高
    数据库高级操作
    数据库基本操作
    with-上下文管理器
  • 原文地址:https://www.cnblogs.com/goOtter/p/9533441.html
Copyright © 2011-2022 走看看