jQuery replaceWith() 方法
jQuery 教程
· 2019-03-27 18:28:40
实例
把第一个 <p> 元素替换为新的文本:
$("button").click(function(){
$("p:first").replaceWith("Hello world!");
});
定义和用法
replaceWith() 方法把被选元素替换为新的内容。
语法
$(selector).replaceWith(content,function(index))
| 参数 | 描述 |
|---|---|
| content | 必需。规定要插入的内容(可包含 HTML 标签)。
可能的值:
|
| function(index) | 可选。规定返回替换内容的函数。
|
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
Ant Colony Optimization
Marco Dorigo、Thomas Stützle / A Bradford Book / 2004-6-4 / USD 45.00
The complex social behaviors of ants have been much studied by science, and computer scientists are now finding that these behavior patterns can provide models for solving difficult combinatorial opti......一起来看看 《Ant Colony Optimization》 这本书的介绍吧!