javascript - 如何从 API 响应中清除我的模板设置为 #comments-list 的所有数据
问题描述
var showResults = function (title, overview,picture,pictureBack) {
var $template = $('#comment-template').html();
$template = $($template);
$template.find('h4').text(title);
$template.find('p').text(overview);
$template.find('#pic').append(picture);
$template.find('#picBack').append(pictureBack);
var $commentsList = $("#comments-list");
$commentsList.append($template);
}
我想通过单击进行研究的按钮来重置模板
解决方案
推荐阅读
- python - 导入前路径管理的良好编码实践(python)是什么?
- gwt - GWT:如何从 gwt 2.7.0 迁移到 gwt 2.8.2
- sap-erp - SAP 模块 MM 中是否有任何事务表?
- node.js - 如何将一个值与另一个迭代的值相比较(我不知道如何提出问题)
- azure-active-directory - 是否可以在 Azure AD 中邀请未启用电子邮件的来宾用户 ID
- laravel - AES-128-CBC 算法:openssl_encrypt():使用空的初始化向量 (iv) 可能不安全,不推荐
- azure - Azure AppService 从容器注册表标签选择中持续部署
- sql - 如何在 BigQuery 中查询结构,其中两个键:值对很重要
- javascript - 如何在库中使用 Angular 应用程序库
- c++ - 为什么 range::basic_istream_view::begin() 没有被缓存?