OOP concept
This commit is contained in:
15
static/login.js
Normal file
15
static/login.js
Normal file
@@ -0,0 +1,15 @@
|
||||
document.getElementById('login-btn').addEventListener('click', function () {
|
||||
const username = document.getElementById('usrnm').value.trim();
|
||||
const password = document.getElementById('pw').value;
|
||||
|
||||
if (!username || !password) {
|
||||
alert("Bitte Benutzername und Passwort eingeben.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Beispiel: Zufällige User-ID generieren (normalerweise kommt das vom Server)
|
||||
const userid = Math.floor(Math.random() * 100000);
|
||||
|
||||
// Weiterleitung zur Startseite mit Parametern
|
||||
window.location.href = `/unsecure/?username=${encodeURIComponent(username)}&userid=${userid}`;
|
||||
});
|
||||
Reference in New Issue
Block a user