7 lines
No EOL
272 B
JavaScript
7 lines
No EOL
272 B
JavaScript
function login() {
|
|
const usernameInput = document.getElementById('username');
|
|
const passwordInput = document.getElementById('password');
|
|
|
|
const credentials = `${usernameInput.value}:${passwordInput.value}`;
|
|
document.cookie = `credentials=${credentials}; path=/`;
|
|
} |