Created
October 9, 2014 17:10
-
-
Save nqthqn/773979e196bee85df8d6 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/wesetu/1
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> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/normalize.min.css" rel="stylesheet" type="text/css" /> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/foundation.min.css" rel="stylesheet" type="text/css" /> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/vendor/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/foundation.min.js"></script> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="row"> | |
<div class="large-12 columns"> | |
<h1>My Calculater</h1> | |
<input type="text" id='input' placeholder='2+1'> | |
<p id="output" class='panel'>?</p> | |
<a href="#" class='button'>Evaluate</a><br> | |
</div> | |
</div> | |
<script id="jsbin-javascript"> | |
$('a').on('click', function(){ | |
var input = $('#input').val(); | |
$('#output').html(eval(input)); | |
}); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<link href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/normalize.min.css" rel="stylesheet" type="text/css" /> | |
<link href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/foundation.min.css" rel="stylesheet" type="text/css" /> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/vendor/jquery.min.js"><\/script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/foundation.min.js"><\/script> | |
<script src="//code.jquery.com/jquery-1.11.1.min.js"><\/script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="row"> | |
<div class="large-12 columns"> | |
<h1>My Calculater</h1> | |
<input type="text" id='input' placeholder='2+1'> | |
<p id="output" class='panel'>?</p> | |
<a href="#" class='button'>Evaluate</a><br> | |
</div> | |
</div> | |
</body> | |
</html></script> | |
<script id="jsbin-source-javascript" type="text/javascript">$('a').on('click', function(){ | |
var input = $('#input').val(); | |
$('#output').html(eval(input)); | |
});</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
$('a').on('click', function(){ | |
var input = $('#input').val(); | |
$('#output').html(eval(input)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment