Skip to content

Instantly share code, notes, and snippets.

Created April 8, 2017 22:11
Show Gist options
  • Save anonymous/dabb9271fe8dfdf1cf39adfa467f0c5c to your computer and use it in GitHub Desktop.
Save anonymous/dabb9271fe8dfdf1cf39adfa467f0c5c to your computer and use it in GitHub Desktop.
Exported from Popcode.
<!Doctype HTML>
<html>
<head>
<script src="https://code.jquery.com/jquery.js"> </script>
<script src="script.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<title>Password Guesser></title>
</head>
<body>
<input id="input">
<button type="button">can you guess the word!</button>
<h1></h1>
</body>
</html>
// JavaScript File
$(document).ready(function() {
var secretword = "Hello";
$("button").click(function() {
if (secretword === $("#input").val()) {
//instad of using line 11 try line 12
// $("h1").append("congratulations");
$("h1").html("congratulations");
}
//var name = $("#input").val();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment