Hi there Nicole107,
and a warm welcome to these forums.
Bearing in mind that this a fun rather than a real secure login, try this...
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1">
<title>untitled document</title>
<!--<link rel="stylesheet" href="screen.css" media="screen">-->
<style media="screen">
body {
background-color: #f0f0f0;
text-align: center;
}
#login {
display: inline-block;
padding: 1em;
border: 0.06em solid #999;
border-radius: 0.5em;
background-color: #fff;
box-shadow: inset 0 0 1em #999, 0.3em 0.3em 0.3em #999;
}
</style>
</head>
<body>
<form id="login" action="http://www.coothead.co.uk/images/"><!--this is for an incorrect password, or for those with JavaScript disabled -->
<label for="pswd">Enter Password: </label>
<input id="pswd" type="password" name="password">
<input id="sbmt" type="submit" value="log in">
</form>
<script>
(function() {
'use strict';
document.getElementById('sbmt').addEventListener('click',
function(){
if(document.getElementById('pswd').value.toLowerCase()==='mypassword'){
document.getElementById('login').action='http://www.dynamicdrive.com/forums/'; /* this is for a correct password */
}},false);
}());
</script>
</body>
</html>
coothead
~ the original bald headed old fart ~
Bookmarks