HTML CALCULATOR
HTML CALCULATOR
HTML CALCULATOR
<html>
<head>
<script>
function dis(val)
{
document.getElementById("result").value+=val
}
function solve()
let x = document.getElementById("result").value
let y = eval(x)
document.getElementById("result").value = y
function clr()
document.getElementById("result").value = ""
}
</script>
.title{
margin-bottom: 10px;
text-align:center;
width: 214px;
color:green;
text-align: center;
input[type="button"]
background-color:green;
color: black;
width:100%
input[type="text"]
background-color:white;
width:100%
}
</style>
</head>
<!---Create Table--->
<body><br><br><br><br><br><br><br>
<div align="center" style="margin-bottom: 10px; text-align: center; border: solid black 2px;
font-size: 50px; color: green;">Single CODE Calculator</div><br><br><br><br>
<table border="5" cellpadding="10px" cellspacing="0" align="center" >
<tr>
<!-- clr() function will call clr to clear all value -->
</tr>
<tr>
<!-- create button and assign value to each button -->
</tr>
<tr>
<tr>
</tr>
<tr>
</table>
</body>
</html>