---
title: "jQuery的HTML操作"
author: "Isky110"
date: "2011-12-06T20:53:00Z"
tags: []
slug: "jquery-html"
draft: false
lastmod: "2012-01-10T12:16:17Z"
id: 1339975
url: "https://Isky001.iteye.com/blog/1339975"
---

$(selector).html(content); 修改HTML内容。

$(selector).append(content); 将内容添加所有匹配元素的后面。

$(selector).prepend(content); 将内容添加所有匹配元素的前面。

$(selector).after(content); 将内容添加所有匹配元素的下一行。

$(selector).before(content); 将内容添加所有匹配元素的前一行。

示例：