Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added BIN +21 KB Week1/homework/calculator/bkgd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
324 changes: 324 additions & 0 deletions 324 Week1/homework/calculator/calc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions 53 Week1/homework/calculator/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, width=device-width, user-scalable=true" />
<title>Simple Calculator</title>
<meta name="description" content="A simple calculator made by Georgios Mouzakis for JS week1 homework.">
<link rel="stylesheet" href="main.css">
<script type="text/javascript" src="main.js"></script>
</head>

<body>
<div class="container">
<h4>Simple Calculator</h4>
<tr>
<td colspan="5"><div id="display-container"><div id="display1"><small><small><span></span></small></small></div><div id="h1"><small><small><span></span></small></small></div></div></td>
</tr>

<tr>
<td><button id="c" class="top" onclick='getElementById("h1").innerHTML = c("")'>C</button></td>
</tr>

<tr>
<td><button onclick='getElementById("h1").innerHTML = digit("7")'>7</button></td>
<td><button onclick='getElementById("h1").innerHTML = digit("8")'>8</button></td>
<td><button onclick='getElementById("h1").innerHTML = digit("9")'>9</button></td>
<td><button onclick='getElementById("h1").innerHTML = operators("+")'>+</button></td>
</tr>

<tr>
<td><button onclick='getElementById("h1").innerHTML = digit("4")'>4</button></td>
<td><button onclick='getElementById("h1").innerHTML = digit("5")'>5</button></td>
<td><button onclick='getElementById("h1").innerHTML = digit("6")'>6</button></td>
<td><button onclick='getElementById("h1").innerHTML = operators("-")'>-</button></td>
</tr>

<tr>
<td><button onclick='getElementById("h1").innerHTML = digit("1")'>1</button></td>
<td><button onclick='getElementById("h1").innerHTML = digit("2")'>2</button></td>
<td><button onclick='getElementById("h1").innerHTML = digit("3")'>3</button></td>
<td><button onclick='getElementById("h1").innerHTML = operators("/")'>/</button></td>
</tr>

<tr>
<td><button onclick='getElementById("h1").innerHTML = dot(".")'>.</button></td>
<td><button onclick='getElementById("h1").innerHTML = digit("0")'>0</button></td>
<td><button onclick='getElementById("h1").innerHTML = equal()'>=</button></td>
<td><button onclick='getElementById("h1").innerHTML = operators("*")'>X</button></td>
</tr>
</div>
</body>
</html>
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.