zoukankan      html  css  js  c++  java
  • jQuery 文档操作

    $(target).method(content)                                 $(content).method(target) 

    append() 元素末尾追加                                       appendTo()  

    prepend() 元素起始处插入                                  prependTo() 

    after() 元素之后                                                   insertAfter()

    before() 元素之前                                               insertBefore()

    replaceWith() 替换                                             replaceAll()

    wrap()  包装每一个选中的元素                           wrapInner()

     .clone() :Create a deep copy of the set of matched elements.

    .wrapAll() :  Wrap an HTML structure around all elements in the set of matched elements.

    .empty() :  删除选中元素的子节点包括文本节点,但不会影响自身。

    .remove() : 从文档中移除选中元素以及元素的所有内容

    .detach() : The .detach() method is the same as .remove(), except that .detach() keeps all jQuery data and events associated with the removed elements.

    .unwrap() : Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. This is effectively the inverse of the .wrap() method.

  • 相关阅读:
    linux
    linux
    linux
    linux
    linux
    linux
    linux
    idea插件篇之java内存分析工具(JProfiler)
    Jmeter(线程组+http请求+汇总报告)
    ZK客户端zkClient.bat
  • 原文地址:https://www.cnblogs.com/goOtter/p/9533541.html
Copyright © 2011-2022 走看看