This commit is contained in:
2025-10-23 20:10:40 +02:00
commit c02ccaf272
5 changed files with 262 additions and 0 deletions

17
script.js Normal file
View File

@@ -0,0 +1,17 @@
const value = document.querySelector("#satisfaction_level");
const input = document.querySelector("#satisfaction");
value.textContent = input.value;
input.addEventListener("input", (event) => {
value.textContent = event.target.value;
});
const form = document.getElementById('userinfo');
const checkboxes = form.querySelectorAll('input[name="interests"]');
const checkedCount = Array.from(checkboxes).some(cb => cb.checked);
form.addEventListener('submit', (event) => {
if (checkedCount < 1) {
event.preventDefault();
alert('Please select at least one country.');
}
});