jQuery add() 方法
jQuery 教程
· 2019-03-27 22:16:35
实例
把 <p> 和 <span> 元素添加到已存在的元素组合中(<h1>):
$("h1").add("p").add("span")
定义和用法
add() 方法把元素添加到已存在的元素组合中。
该方法把元素添加到整个文档上,如果规定了 context 参数则只添加到上下文元素内部。
语法
$(selector).add(element,context)
参数 | 描述 |
---|---|
element | 必需。规定要添加到已存在的元素集合的选择器表达式、jQuery 对象、一个或多个元素、HTML 片段。 |
context | 可选。规定选择器表达式在文档中开始进行匹配的位置。 |
点击查看所有 jQuery 教程 文章: https://www.codercto.com/courses/l/35.html
REST in Practice
Jim Webber、Savas Parastatidis、Ian Robinson / O'Reilly Media / 2010-9-24 / USD 44.99
Why don't typical enterprise projects go as smoothly as projects you develop for the Web? Does the REST architectural style really present a viable alternative for building distributed systems and ent......一起来看看 《REST in Practice》 这本书的介绍吧!