calculator code
calculator code
<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>
<!—for styling
<style>
.title{
Margin-bottom: 10px;
Text-align:center;
Width: 210px;
Color:green;
Input[type=”button”]
Background-color:green;
Color: black;
Width:100%
Input[type=”text”]
{
Background-color:white;
Width:100%
</style>
</head>
<!—create table
<body>
<table border=”1”>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</body>
</html>