/
memoryspeak
/
MemorySpeakWebClient
Обзор
Документация
Войти
/
memoryspeak
/
MemorySpeakWebClient
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
static/js/Alert.js
30 строк
991 B
memoryspeak
initial commit: project structure
20 ноя 2025, 21:54
20 ноя 2025, 21:54
9ddd280
Код
Авторство
О чём код?
class Alert { static draw() { document.body.innerHTML += ` <div id="alertModal" class="modal" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 id="alertTitle" class="modal-title"></h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <p id="alertBody" style="word-break: break-all;"></p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">OK</button> </div> </div> </div> </div> `; }; static show(title, body) { const alertModal = new bootstrap.Modal(document.getElementById('alertModal')); document.getElementById('alertTitle').innerHTML = title; document.getElementById('alertBody').innerHTML = body; alertModal.show(); }; };