Skip to content

Instantly share code, notes, and snippets.

@RCTumolac
Created December 7, 2016 23:48
Show Gist options
  • Save RCTumolac/7229ab700e8291e0012624eff2d8090f to your computer and use it in GitHub Desktop.
Save RCTumolac/7229ab700e8291e0012624eff2d8090f to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=7229ab700e8291e0012624eff2d8090f
<!DOCTYPE html>
<html>
<head>
<title>Name Exercise</title>
</head>
<body>
<h1> What is your name? </h1>
<input id = "Place" placeholder = "Your name here">
<button id = "Button" > Say Hello! </button>
<p></p>
<img src = "http://img11.deviantart.net/55e0/i/2013/053/1/3/please_give_me_points_by_ninjas_r_us_comics-d5vsjtt.png" />
</body>
</html>
{"enabledLibraries":["jquery"]}
$("Button").click(function(){
var Name = $("#Place").val();
$("p").append("<p> Hi "+ Name +"</p>");
});
#Place{
height: 20px;
width: 170px;
color: gray;
border-style: solid;
border-color: black;
float: left;
border-width: 0.5px;
}
#Button{
height: 20px;
width: 75px;
border-color: black;
border-style: solid;
float: left;
border-width: 0.5px;
}
p{
font-size: 50px;
font-family: impact;
display: block;
clear: left;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment