html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<script> let plusOrMinus = null;
let num1 = null;</script>
<body>
<h2 id="output">output</h2>
<div>
<button>1</button>
<button>2</button>
<button>3</button>
<button>4</button>
<button>5</button>
<button>6</button>
<button>7</button>
<button>8</button>
<button>9</button>
<button>-</button>
<button>0</button>
<!--This-->
<button onclick="plusOrMinus = false;
(function(){
document.getElementById('output').textContent = 'Ergebnis: ' + plusOrMinus;
})();">-</button>
<button>0</button>
<button onclick="plusOrMinus = true;
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
body {
background-color: black;
}
button {width:100px;
height:50px;
font-size:20px;
}
h2 {
text-align:center;
color: white;
}
div {
text-align:center;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
function if1(num){
if (num == null){
num = "1";
}
else{
num = num + "1";
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run