PRV-Website/calculator.html

42 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculator</title>
</head>
<body>
<div id="calculator">
<input id="display" readonly>
<div id="buttons">
<button class="lightGrey" onclick="clearDisplay()">AC</button>
<button class="lightGrey" onclick="changeKeySignature()">+/-</button>
<button class="lightGrey" onclick="getPercentage()">%</button>
<button class="orange" id="division" onclick="setOperator('/')">/</button>
<button class="darkGrey" onclick="appendToDisplay('7')">7</button>
<button class="darkGrey" onclick="appendToDisplay('8')">8</button>
<button class="darkGrey" onclick="appendToDisplay('9')">9</button>
<button class="orange" id="multiplication" onclick="setOperator('*')">x</button>
<button class="darkGrey" onclick="appendToDisplay('4')">4</button>
<button class="darkGrey" onclick="appendToDisplay('5')">5</button>
<button class="darkGrey" onclick="appendToDisplay('6')">6</button>
<button class="orange" id="minus" onclick="setOperator('-')">-</button>
<button class="darkGrey" onclick="appendToDisplay('1')">1</button>
<button class="darkGrey" onclick="appendToDisplay('2')">2</button>
<button class="darkGrey" onclick="appendToDisplay('3')">3</button>
<button class="orange" id="plus" onclick="setOperator('+')">+</button>
<button class="darkGreyBig" onclick="appendToDisplay('0')">0</button>
<button class="darkGrey" onclick="appendToDisplay('.')">,</button>
<button class="orange" onclick="calculate()">=</button>
</div>
</div>
<script src="calculator.js"></script>
</body>
<link rel="stylesheet" href="calculatorStyle.css">
</html>