Skip to content

Instantly share code, notes, and snippets.

@bholzer
Created April 8, 2014 05:03
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 bholzer/10092919 to your computer and use it in GitHub Desktop.
Save bholzer/10092919 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<body bgcolor="cyan">
<h1>My First Program</h1>
<button onclick="X()"><p ID="Y">Hey You!</p></button>
<input type="text" value="Z" name="Z">
<button onclick="Q()"><p>..</p></button>
<p ID="S"></p>
<script>
function X() {
document.getElementById("Y").innerHTML="Type your name!";
}
function Q() {
var x=document.getElementById("Z").value;
alert("Nice to Meet You!");
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment