Sử dụng tiện ích bổ sung Bộ đếm thời gian để đặt bộ đếm cho biểu mẫu của bạn
Cài đặt
Mở tiện ích bổ sung Bộ đếm thời gian cho Google Forms™️
Bước 1: Nhấp vào nút Tiện ích bổ sung
Bước 2: Nhấp vào Bộ đếm thời gian cho Google Forms™️
Đây là giao diện người dùng của Bộ đếm thời gian
Nhấp vào nút để đặt bộ đếm
Xem trước giao diện
Trực quan và rõ ràng
Thời gian đã ghi lại
Người dùng biểu mẫu có thể xem thời gian họ đã mất để hoàn thành biểu mẫu
Người tạo biểu mẫu có thể xem dữ liệu trong Google Sheets™️
Tự động và hiệu quả
-->
navToggle.addEventListener('click', toggleMenu);
// Hiện/ẩn dropdown sản phẩm hoặc modal
productsLink.addEventListener('click', function(e) {
e.preventDefault();
if (window.innerWidth <= 768) {
productsModal.style.display = 'block';
if (navLinks.classList.contains('show')) {
toggleMenu();
}
} else {
productsDropdown.classList.toggle('show');
}
});
// Đóng modal di động
if (productsModal) {
const closeBtn = productsModal.querySelector('.close');
closeBtn.addEventListener('click', function() {
productsModal.style.display = 'none';
});
}
// Đóng dropdown hoặc modal khi nhấp ra ngoài
window.addEventListener('click', function(e) {
if (!e.target.matches('#productsLink')) {
if (productsDropdown.classList.contains('show')) {
productsDropdown.classList.remove('show');
}
if (productsModal && e.target == productsModal) {
productsModal.style.display = 'none';
}
}
if (!e.target.matches('#languageBtn')) {
if (languageDropdown.classList.contains('show')) {
languageDropdown.classList.remove('show');
}
}
});
// Thêm sự kiện nhấp cho các liên kết điều hướng khác
document.querySelectorAll('.nav-links a:not(#productsLink)').forEach(link => {
link.addEventListener('click', function(e) {
if (this.getAttribute('href').startsWith('#')) {
e.preventDefault();
if (window.innerWidth <= 768) {
toggleMenu();
}
const targetId = this.getAttribute('href').substring(1);
const targetElement = document.getElementById(targetId);
if (targetElement) {
targetElement.scrollIntoView({behavior: 'smooth'});
}
}
});
});
// Chọn ngôn ngữ
languageBtn.addEventListener('click', function() {
languageDropdown.classList.toggle('show');
});
});