Tuesday 20 December 2016

HTML Caliculator

<html>
<head>
<title> calculator </title>
<style>
.roundtable
{
    background-color:blue;
    border: 20px solid red;
    border-radius: 20px;
}

.rou
{
    border-radius: 25px;
    border: 20px solid red;
    padding: 20px;
    width: 300px;
    height: 250px;
}
</style>
</head>
<body>
<br/>
<form Name="calc">
<font size="6">
<table class="rou" align="center"  border="5" bgcolor="pink">
<caption align="bottom"> <font face="algerian" size="2" color="red" >Simple Calculator</font></caption>
<tr>
<td colspan="4"><input size="33" type="text" Name="display"></td>
</tr>
<tr align="center">
<td><input type="button" value="0" OnClick="calc.display.value+='0'"></td>
<td><input type="button" value="1" OnClick="calc.display.value+='1'"></td>
<td><input type="button" value="2" OnClick="calc.display.value+='2'"></td>
<td><input type="button" value="+" OnClick="calc.display.value+='+'"></td>
</tr>
<tr align="center">
<td><input type="button" value="3" OnClick="calc.display.value+='3'"></td>
<td><input type="button" value="4" OnClick="calc.display.value+='4'"></td>
<td><input type="button" value="5" OnClick="calc.display.value+='5'"></td>
<td><input type="button" value="-" OnClick="calc.display.value+='-'"></td>
</tr>
<tr align="center">
<td><input type="button" value="6" OnClick="calc.display.value+='6'"></td>
<td><input type="button" value="7" OnClick="calc.display.value+='7'"></td>
<td><input type="button" value="8" OnClick="calc.display.value+='8'"></td>
<td><input type="button" value="x" OnClick="calc.display.value+='*'"></td>
</tr>
<tr align="center">
<td><input type="button" value="9" OnClick="calc.display.value+='9'"></td>
<td><input type="button" value="C" OnClick="calc.display.value=''"></td>
<td><input type="button" value="=" OnClick="calc.display.value=eval(calc.display.value)"></td>
<td><input type="button" value="/" OnClick="calc.display.value+='/'"></td>
</tr>
</table>
</form></font>
</body>
</html>


No comments:

Post a Comment

Oracle Reserved Words

Oracle  Reserved Words The following words are reserved by Oracle. That is, they have a special meaning to Oracle and so cannot be redefi...