Created
January 8, 2012 06:39
-
-
Save hiroshi-maybe/1577494 to your computer and use it in GitHub Desktop.
instantly check javascript whether it can be compiled to not.
This file contains 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 type="text/javascript" | |
src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script>//<![CDATA[ | |
$(document).ready(function(){ | |
var p = function(val){ | |
$("#result").append(val+"<br/>"); | |
}; | |
$("#eval-btn").click(function(){ | |
eval($("#input").val()); | |
}); | |
$("#clear-btn").click(function(){ | |
$("#result").empty(); | |
}); | |
}); | |
//]]></script> | |
</head> | |
<body> | |
<div>p: method to show messages on screen</div> | |
<textarea id="input" rows="400" cols="100" style="float:left"></textarea> | |
<div style="float:left"> | |
<button id="eval-btn" style="float:left">eval</button> | |
<button id="clear-btn" style="float:left">clear</button> | |
<div id="result" style="clear:left">log:<br/></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment