Skip to content

Instantly share code, notes, and snippets.

@unamanic
Last active August 29, 2015 14:14
Show Gist options
  • Save unamanic/1e7dcd9f103912568536 to your computer and use it in GitHub Desktop.
Save unamanic/1e7dcd9f103912568536 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<meta charset="UTF-8">
<title>Reflector</title>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
var $inputArea = $("#inputArea");
var $inputSubmit = $("#inputSubmit");
var $reflector = $("#reflector");
$inputSubmit.click(function() {
$reflector.contents().find("html").html($inputArea.val());
});
});
</script>
<table width="100%">
<tr>
<td width="50%">
<textarea rows="30" cols="70" id="inputArea"></textarea> <br />
<input type="button" id="inputSubmit" value="Submit" />
</td>
<td>
<iframe width="100%" height="100%" id="reflector"></iframe>
</td>
</tr>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment