payment/payment_headend/js/customAlert.js

16 lines
474 B
JavaScript
Raw Normal View History

2024-11-20 17:09:07 +00:00
function showCustomAlert(message) {
const alertBox = document.getElementById('customAlert');
2024-11-28 13:20:57 +00:00
alertBox.innerHTML = message;
2024-11-20 17:09:07 +00:00
alertBox.style.display = 'block';
alertBox.style.opacity = '1';
// 3秒后隐藏弹窗
setTimeout(() => {
alertBox.style.opacity = '0';
// 等到过渡效果结束再隐藏元素
setTimeout(() => {
alertBox.style.display = 'none';
2024-11-21 12:11:16 +00:00
}, 1000); // 与过渡时间一致
}, 5000);
2024-11-20 17:09:07 +00:00
}