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://codercto.com/courses/l/35.html

查看所有标签

Beginning Google Maps API 3

Beginning Google Maps API 3

Gabriel Svennerberg / Apress / 2010-07-27 / $39.99

This book is about the next generation of the Google Maps API. It will provide the reader with the skills and knowledge necessary to incorporate Google Maps v3 on web pages in both desktop and mobile ......一起来看看 《Beginning Google Maps API 3》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

SHA 加密
SHA 加密

SHA 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换