在存储了一些数据后,我不知道如何使它显示在自举面包上
(javascript)
function getItemSuccess(data) {
//4.3 Show the data in a Bootstrap Toast UI component
$('.toast').toast('show')
});
(html)
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<img src="..." class="rounded mr-2" alt="...">
<strong class="mr-auto">DominantColor</strong>
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
</div>
</div>
答案 0 :(得分:0)
尝试一下:
function getItemSuccess(data) {
$('.toast strong').html(data);
$('.toast').toast('show')
});