mirror of
https://github.com/lucaspalomodevelop/Party.git
synced 2026-03-14 16:34:35 +00:00
20 lines
627 B
JavaScript
20 lines
627 B
JavaScript
const checkbox = document.getElementById('checkbox');
|
|
const numberInput = document.getElementById('number');
|
|
const createButton = document.getElementById('createButton');
|
|
|
|
checkbox.addEventListener('change', function() {
|
|
numberInput.disabled = !checkbox.checked;
|
|
});
|
|
|
|
createButton.addEventListener('click', function() {
|
|
const inputValue = document.getElementById('name').value;
|
|
|
|
if (inputValue !== '') {
|
|
window.location.href = '/session';
|
|
} else {
|
|
alert('Bitte füllen Sie das Input-Feld aus.');
|
|
}
|
|
});
|
|
cancelButton.addEventListener('click', function() {
|
|
window.location.href = '/';
|
|
}); |