jQuery replaceAll() 方法
jQuery 教程
· 2019-03-27 18:13:37
实例
把最后一个 <p> 元素替换为 <span> 元素:
$("button").click(function(){
$("<span>Hello world!</span>").replaceAll("p:last");
});
定义和用法
replaceAll() 方法把被选元素替换为新的 HTML 元素。
语法
$(content).replaceAll(selector)
| 参数 | 描述 |
|---|---|
| content | 必需。规定要插入的内容(必须包含 HTML 标签)。 |
| selector | 必需。规定哪一个元素将被替换。 |
点击查看所有 jQuery 教程 文章: https://www.codercto.com/courses/l/35.html
Mastering JavaServer Faces
Bill Dudney、Jonathan Lehr、Bill Willis、LeRoy Mattingly / Wiley / 2004-6-7 / USD 40.00
Harness the power of JavaServer Faces to create your own server-side user interfaces for the Web This innovative book arms you with the tools to utilize JavaServer Faces (JSF), a new standard that wi......一起来看看 《Mastering JavaServer Faces》 这本书的介绍吧!