Created
June 17, 2018 07:34
-
-
Save ideasatrandom/b96022464f12519d371b976ac9259ccf to your computer and use it in GitHub Desktop.
basic-form-javascript created by ideasatrandom - https://repl.it/@ideasatrandom/basic-form-javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>repl.it</title> | |
<link href="index.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> | |
<h1>Basic Form with Javascript</h1> | |
<p id="hello"></p> | |
<input id="typeit" /> <input type="button" id="sendit">Send It</input> | |
<script src="index.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById("sendit").addEventListener("click" | |
, function(evt){ | |
var msg = document.getElementById("typeit").value; | |
var hello = document.getElementById("hello"); | |
hello.innerHTML = msg; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment