Created
April 18, 2015 01:52
-
-
Save mikestratton/721c69f96090c137e81f to your computer and use it in GitHub Desktop.
Input/Output in same page.
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$("#submit").click(function(){ | |
var postInputVal = $("#postinput").val(); | |
$("#postecho").val(postInputVal); | |
console.log("OK!"); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div style="width:300px;float:left;"> | |
<p>Input:</p> | |
<p><textarea cols="30" maxlength="9999" name="postInput" id="postinput" rows="6"></textarea></p> | |
</div> | |
<div style="width:300px;float:left;"> | |
<p>Output:</p> | |
<p><textarea cols="30" maxlength="9999" name="postEcho" id="postecho" rows="6"></textarea></p> | |
</div> | |
<div style="clear:both;"></div> | |
<p><input type="submit" value="submit" id="submit" /></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment