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
<div class="box">
<div class="display"><input type="text" readonly size="16" id="d"></div>
<div class="keys">
<p><input type="button" class="button gray "
value="mrc" onclick='c'>
<input type="button" class="button gray"
value="m-" onclick='c'>
<input type="button" class="button gray" value="m+" onclick='c'>
<input type="button" class="button pink"
value="/" onclick='v("/")'></p>
<p><input type="button" class="button black"
value="7" onclick='v("7")'><input type="button"
class="button black" value="8" onclick='v("8")'>
<input type="button" class="button black" value="9"
onclick='v("9")'><input type="button"
class="button pink" value="*" onclick='v("*")'></p>
<p><input type="button" class="button black"
value="4" onclick='v("4")'><input type="button"
class="button black" value="5" onclick='v("5")'>
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
18
19
20
21
22
23
24
25
26
27
28
body
{
background-color:black;
}
.box
{
background-color:#3d4543;
height:300px;
width:250px;
border-radius:10px;
position:relative;
top:80px;
left:40%;
}
.display
{
background-color:red;
width:230px;
position:relative;
left:15px;
top:20px;
height:40px;
}
.display input
{
position:relative;
left:2px;
top:2px;
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//credit to anoop for this
alert ("comment ur suggestions so i can improve it")
function c(val)
{
document.getElementById("d").value=val;
}
function v(val)
{
document.getElementById("d").value+=val;
}
function e()
{
try
{
c(eval(document.getElementById("d").value))
}
catch(e)
{
c('Error')
}
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run