A Pen by Pranav Sharma on CodePen.
Created
January 12, 2016 10:00
-
-
Save phraniiac/84224cf04eaa2abb01ed to your computer and use it in GitHub Desktop.
WrOrrq
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> | |
<body> | |
<div class="container"> | |
<form id="cal"> | |
<div class="grid"> | |
<div class="row"> | |
<input type="text" id="disp" style="length=600;"></input> | |
</div> | |
<div class="row"> | |
<div class="col-xs-1"> | |
<button id="one" OnClick="disp.value+='1'">1</button> | |
</div> | |
<div class="col-xs-1"> | |
<button id="two" OnClick="disp.value+='2'">2</button> | |
</div> | |
<div class="col-xs-1"> | |
<button id="three" OnClick="disp.value+='3'">3</button> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-1"> | |
<button id="four" OnClick="disp.value+='4'">4</button> | |
</div> | |
<div class="col-xs-1"> | |
<button id="five" OnClick="disp.value+='5'">5</button> | |
</div> | |
<div class="col-xs-1"> | |
<button id="six" OnClick="disp.value+='6'">6</button> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-1"> | |
<button id="seven" OnClick="disp.value+='7'">7</button> | |
</div> | |
<div class="col-xs-1"> | |
<button id="eight" OnClick="disp.value+='8'">8</button> | |
</div> | |
<div class="col-xs-1"> | |
<button id="nine" OnClick="disp.value+='9'">9</button> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-1"> | |
<button OnClick="disp.value+='+'">+</button> | |
</div> | |
<div class="col-xs-1"> | |
<button OnClick="disp.value+='0'">0</button> | |
</div> | |
<div class="col-xs-1"> | |
<button OnClick="disp.value+='*'">*</button> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-1"> | |
<button OnClick="disp.value+='/'">/</button> | |
</div> | |
<div class="col-xs-1"> | |
<button OnClick="disp.value+='-'">-</button> | |
</div> | |
<div class="col-xs-1"> | |
<button OnClick="disp.value=''">C</button> | |
</div> | |
<div class="col-xs-1"> | |
<button OnClick="disp.value=eval(disp.value)">=</button> | |
</div> | |
</div> | |
</div> | |
</form> | |
</div> | |
</body> | |
</html> |
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
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> |
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
#disp{ | |
text-align: right; | |
} |
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
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment