jQuery .html()
示例
您可以使用此方法替换选择器中的所有HTML。假设您有一个这样的html元素
<div class="row">
<div class="col-md-12">
<div id="information">
<p>Old message</p>
</div>
</div>
</div>您可以使用。删除并添加警报或信息性文本,以一行警告所有用户。.html()
$("#information").html("<p>This is the new alert!</p>");