Skip to content

Instantly share code, notes, and snippets.

@alexpelan
Created February 28, 2017 05:16
Show Gist options
  • Select an option

  • Save alexpelan/88b30e17320e4eeecf4a0c0f0ddbb0e6 to your computer and use it in GitHub Desktop.

Select an option

Save alexpelan/88b30e17320e4eeecf4a0c0f0ddbb0e6 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=88b30e17320e4eeecf4a0c0f0ddbb0e6
<!DOCTYPE html>
<html>
<head>
<title>Welcome To Javascript Variables</title>
</head>
<body>
<h1>Welcome to Javascript</h1>
<div>
<span>Your Name: </span>
<input type="text" id = "name">
</div>
<button>submit</button>
<p></p>
</body>
</html>
{"enabledLibraries":["jquery"]}
/*
Directions:
1. Create a click handler for the button
2. Inside the click handler, create a variable named user
3. Assign the variable the value of the name input box
4. Append "Hello" plus user to the paragraph tag
*/
body {
text-align: center;
}
button {
font-size: 30px;
padding: 20px;
}
div {
font-size: 30px;
padding: 20px;
}
input {
height: 30px;
width: 200px;
}
p {
font-size: 30px;
color: green;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment