|
@@ -56,7 +56,7 @@
|
|
|
<button class="close-btn" onclick="closeAlert()">×</button>
|
|
|
{{-- <div class="icon"></div>--}}
|
|
|
<div class="message"> </div>
|
|
|
- <div class="countdown">5秒后自动关闭</div>
|
|
|
+ <div class="countdown">5 seconds later, it will close automatically.</div>
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
@@ -75,13 +75,14 @@
|
|
|
const countdownElement = document.querySelector('.countdown');
|
|
|
const timer = setInterval(() => {
|
|
|
seconds--;
|
|
|
- countdownElement.textContent = `${seconds}秒后自动关闭`;
|
|
|
+ countdownElement.textContent = `${seconds} seconds later, it will close automatically.`;
|
|
|
if (seconds <= 0) clearInterval(timer);
|
|
|
}, 1000);
|
|
|
|
|
|
// 关闭函数
|
|
|
function closeAlert() {
|
|
|
- window.history.length > 1 ? window.history.back() : window.close();
|
|
|
+ //window.history.length > 1 ? window.history.back() : window.close();
|
|
|
+ window.close();
|
|
|
}
|
|
|
|
|
|
// 5秒自动关闭
|