jQuery prepend() 方法
jQuery 教程
· 2019-03-27 16:28:13
实例
在所有 <p> 元素开头插入内容:
$("button").click(function(){
$("p").prepend("<b>Prepended text</b>");
});
定义和用法
prepend() 方法在被选元素的开头插入指定内容。
提示:如需在被选元素的结尾插入内容,请使用 append() 方法。
语法
$(selector).prepend(content,function(index,html))
| 参数 | 描述 |
|---|---|
| content | 必需。规定要插入的内容(可包含 HTML 标签)。
可能的值:
|
| function(index,html) | 可选。规定返回待插入内容的函数。
|
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
A Byte of Python
Swaroop C H / Lulu Marketplace / 2008-10-1 / USD 27.98
'A Byte of Python' is a book on programming using the Python language. It serves as a tutorial or guide to the Python language for a beginner audience. If all you know about computers is how to save t......一起来看看 《A Byte of Python》 这本书的介绍吧!