Skip to content

Instantly share code, notes, and snippets.

Created April 8, 2017 21:40
Show Gist options
  • Save anonymous/38b850a07376de6964e0395ec891f006 to your computer and use it in GitHub Desktop.
Save anonymous/38b850a07376de6964e0395ec891f006 to your computer and use it in GitHub Desktop.
Exported from Popcode.
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="script.js"></script>
<link href="style.css" rel="stylesheet">
<title>Password Guesser</title>
</head>
<body>
<h1>Can you guess the secret word?</h1>
<input id= "pass" placeholder="guess the secret word">
<button>Submit</button>
<div id = "result"></div>
</body>
</html>
$(document).ready(function(){
var password = "Lol";
$("button").click(function() {
if(password === $("#pass").val()){
alert('correct!');
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment