Skip to content

Instantly share code, notes, and snippets.

@mikehodgson
Created September 26, 2012 20:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mikehodgson/3790260 to your computer and use it in GitHub Desktop.
input mirroring quick example
<html>
<head>
<title>demo</title>
<script type="text/javascript">
function mirrorInput(source, dest) {
var destination = document.getElementById(dest);
destination.innerHTML = source.value;
}
</script>
</head>
<body>
<p>
<span id="yourName"></span>
</p>
<form method="post">
<input type="text" name="name" onKeyUp="mirrorInput(this, 'yourName')" value="">
<button type="submit">Send</button>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment