Skip to content

Instantly share code, notes, and snippets.

@carloswm85
Created January 30, 2020 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carloswm85/ddb3f9892e1d534f870e68ab2013c37f to your computer and use it in GitHub Desktop.
Save carloswm85/ddb3f9892e1d534f870e68ab2013c37f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>First Page</title>
<script>
function greetUser(){
let name = prompt("Please, user, enter your name: ");
let greeting = "Hello, " + name + "hope you are having a wonderful day!";
alert(greeting);
}
</script>
</head>
<body>
<!-- Greet the user with a pop-up window -->
<header>
</header>
<main>
<button type="button" onclick="greetUser()">I'm a button</button>
</main>
<footer>
</footer>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment