jquery随记(DOM操作)-----复制元素

本文探讨了平城的居民分类,从方形、五边形到六边形乃至圆形,阐述了平城社会等级制度及后代继承法则。

 ************************************************************************************

复制元素:clone();

将复制的元素添加到某处:insterBefore(),before(),after()...............

 ************************************************************************************


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="Untitled-2.css" />
<script type="text/javascript" src="jquery-1.6.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
//复制元素
//clone()-- 无参数时:只会复制元素,不会复制元素绑定的事件;
//clone(true)---参数为true时会复制元素绑定的事件;
 //$('p:eq(0)').clone().insertBefore('div.chapter');
 
 $('.pull-quote').each(function (index){
  var $parentParagraph=$('.pull-quote').parent('p');
  $parentParagraph.css('position','relative');     
  var $clonedCopy=$(this).clone();
   $clonedCopy
    .addClass('pulled')
    //.prependTo($parentParagraph);
    .find('.drop')
     .html('&hellip;')
    .end()
    .prependTo($parentParagraph);
  var clonedText=$clonedCopy.text();
  $clonedCopy.html(clonedText);
  });
 });
</script>
</head>
<body>
  <h1 id="f-title">Flatland:A Romance of Many Dimensions</h1>
  <div id="f-author">by Edwin A.Abbott</div>
  <h2>Part 1,Section 3</h2>
  <h3 id="f-subtitle">  
   Concerning the Inhabitants of Flatland
   </h3>
   <div id="excerpt">an excerpt</div>
   <div class="chapter">
     <p class="square">Our Professional Men and Gentlemen are
         Squares (to which class I myself belong) and Five-Sided
            Figures or
            <a href="http://en.wikipedia.org/wiki/Pentagon">Pentagons</a>
         </p>
         <p class="nobility hexagon">Next above these come the
          Nobility,of whom there are several degrees,beginning at
            Six-Sided Figures ,or <a href="http://en.wikipedia.org/wiki/Hexagon">Hexagons</a>
            and from thence rising in the number of their sides till
            they receive the honourable title of
            <a href="http://en.wikipedia.org/wiki/Circle">circle</a> ,he is included in the
            Circular or Priestly order;and this is the highest class of all.
          </p>
          <p><span class="pull-quote"> It is a <span class="drop">Law of Nature</span>
            with us that a male child shall have
                <strong> one more side </strong> than his father </span>,so
                that each generation shall rise (as a rule) one step in
                the scale of development and nobility.Thus the son of a
                Square is a Pentagon ;the son of a Pentagon, a Hexagon;
                and so on.
          </p>              
         <p> Rarely&mdash;in proportion to the vast numbers of Isosceles
           births&mdash;is a genuine and certifiable Equal-Sided
             Triangle produced from Isosceles parents.
             <span class="footnote">  "What need of a certificate?" a Spaceland
             critic may ask:"Is no t the procreation of a Square Son a
             certificate from Nature herself,proving the Equalsidedness
             of the Father?" I reply that no Lady of any position will
             marry an uncertified Triangle. Qquare offspring has
             sometimes resulted from a slightly Irregular Triangle;
             but in almost every such case the Irregularity of the
             first generation is visited on the third ;which either
             fails to attain the Pentagonal rank, or relapses to the Triangular,</span>
             Such a birth requires, as its antecedents ,not also a long-continued exercise of
             frugality and self-control on the part of the would-be
             ancestors of the coming Equilateral,and a patient,
             systematic,and continuous development of the Isosceles in tellect through many
             generations.
           </p>
           <p>The birth of a True Equilateral Triangle from Isosceles
            parents is the subject of rejoicing in our country for many
            furlongs round.After a strict examination conducted by the
            Sanitary and Social Board,the infant, if certified as
            Regular.is with solemn ceremonial admitted into the class
            of Equilaterals.He is then immediately taken from his
            proun yet sorroing parents and adopted by some childless
            Equilateral.<span class="footnote">The Equilateral is
            bound by oath never to permit the child henceforth to enter
            his former home or so much as to look upon his relations
            again, for fear lest the freshly developed organism may,by
            force of unconscious imitation ,fall back again into his
            hereditary level.</span>
          </p>
          <p>How admirable is the Law of Compensation!
            <span class="footnote">And how perfect a proof of the natural
             fitness and,I may almost say,the divine origin of the
             aristocratic constitution of the States of Flatland!</span>
             By a judicious use of this Law of Nature,the Polygons and
             Circles are almost always able to stifle sedition in its
             very cradle,taking advantage of the irrepressible and
             boundless hopefulness of the human mind.&hellip;
          </p>
        </div>
        <div id="footer">lllllllllllllllllll
        </div>  
</body>
</html>

Spring AI Alibaba 是社区核心实现之一,期望帮助开发者更容易地构建智能体应用。它在设计理念上区别于 Spring AI 只做底层原子抽象,基于 Graph 开发者能构建工作流、多智能体应用。在设计理念上借鉴 Langgraph,可理解为 Java 版的 Langgraph 实现,社区还增加了大量预置 Node、简化了 State 定义过程等,方便开发者编写对等低代码平台的工作流、多智能体等 [^1]。 使用 Spring AI Alibaba 时,因为其基于 Spring Boot 3.x 开发,本地 JDK 版本要求为 17 及以上。以下是 Maven 依赖配置示例: ```xml <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.5.0</version> <relativePath/> </parent> <properties> <java.version>21</java.version> </properties> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!--spring-ai-alibaba--> <dependency> <groupId>com.alibaba.cloud.ai</groupId> <artifactId>spring-ai-alibaba-starter</artifactId> <version>1.0.0-M5.1</version> </dependency> ``` 还需要配置 API 密钥: ```properties spring: ai: dashscope: api-key: your-api-key ``` 在扩展功能方面,除了 spring-ai-alibaba-core 中包含的 JsonDocumentParser 和 TextDocumentParser,spring-ai-alibaba 还提供了许多 document-parser 的扩展包,如 Markdown、pdf 等 [^2]。其内部原理遵循 RAG 运作原理,使用 spring-ai-rag 的框架 [^3]。 在使用案例上,Spring AI Alibaba Graph 可用于人类反馈相关应用,基于 Graph 开发者可以构建工作流、多智能体应用 [^1]。另外,在源码学习中,在 DeepResearchConfiguration 里,planner 节点是一个 PlannerNode 类型的节点,创建时需要传入 2 个参数,分别是 plannerAgent 和 converter [^5]。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

bzuld

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值