Skip to content

Commit

Permalink
add calc on page 1
Browse files Browse the repository at this point in the history
  • Loading branch information
TIllAd committed Jan 25, 2024
1 parent 65799e2 commit 045ece4
Showing 1 changed file with 38 additions and 7 deletions.
45 changes: 38 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8">
<title>Tabbed Calculator</title>
<title>Math Stuff</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>

Expand All @@ -17,14 +17,45 @@ <h1 class="title">Tabs</h1>
<button onclick="showPanel(2,'#2196f3')">Tab 3</button>
<button onclick="showPanel(3,'#ff5722')">Tab 4</button>
</div>
<div class="tabPanel">Tab 1:Content</div>
<div class="tabPanel">Tab 2:Content</div>
<div class="tabPanel">Tab 3:Content</div>
<div class="tabPanel">Tab 4:Content</div>
<div class="tabPanel">
<h3>Simple Calculator</h3>
<div id="calculator">
<input type="text" id="display" readonly>
<br>
<button onclick="appendToDisplay('1')">1</button>
<button onclick="appendToDisplay('2')">2</button>
<button onclick="appendToDisplay('3')">3</button>
<button onclick="appendToDisplay('+')">+</button>
<br>
<button onclick="appendToDisplay('4')">4</button>
<button onclick="appendToDisplay('5')">5</button>
<button onclick="appendToDisplay('6')">6</button>
<button onclick="appendToDisplay('-')">-</button>
<br>
<button onclick="appendToDisplay('7')">7</button>
<button onclick="appendToDisplay('8')">8</button>
<button onclick="appendToDisplay('9')">9</button>
<button onclick="appendToDisplay('*')">*</button>
<br>
<button onclick="appendToDisplay('0')">0</button>
<button onclick="clearDisplay()">C</button>
<button onclick="calculateResult()">=</button>
<button onclick="appendToDisplay('/')">/</button>
</div>


</div>
<script src="app.js"></script>





<div class="tabPanel">Tab 2:Content</div>
<div class="tabPanel">Tab 3:Content</div>
<div class="tabPanel">Tab 4:Content</div>


</div>
<script src="app.js"></script>
</body>

</html>

0 comments on commit 045ece4

Please sign in to comment.