Skip to content

Commit

Permalink
Merge pull request #18 from Ghepes/Ghepes-patch-5
Browse files Browse the repository at this point in the history
Create script.js
  • Loading branch information
Ghepes authored May 9, 2024
2 parents d31c5c6 + d9e55c4 commit 4f59b91
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions INFO/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function login(form) {
/*put the users and pass you want*/
if ( form.user.value=="admin" && form.pass.value=="admin123" || form.user.value=="mod" && form.pass.value=="mod123" || form.user.value=="user" && form.pass.value=="user123") {
$('.login').fadeOut(1000);
$('.website').fadeIn(1000);
var user = document.getElementById("user").value;
document.getElementById("username").innerHTML = "Hello " + user;
} else {
alert("Invalid Login")
}
}

$('button').click(function(){
$('.login').fadeIn(1000);
$('.website').fadeOut(1000);
document.forms[0].reset();
});

0 comments on commit 4f59b91

Please sign in to comment.