0% found this document useful (0 votes)
7 views

calc2

The document is an HTML code for a simple calculator interface. It includes buttons for digits 0-9, basic arithmetic operations, a clear button, and an equals button to evaluate expressions. The calculator's display is disabled and updates based on user input through button clicks.

Uploaded by

helena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

calc2

The document is an HTML code for a simple calculator interface. It includes buttons for digits 0-9, basic arithmetic operations, a clear button, and an equals button to evaluate expressions. The calculator's display is disabled and updates based on user input through button clicks.

Uploaded by

helena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

<html>

<head>
<body bgcolor="red">
<center>

<font face="Comic Sans MS" size="3">


Calculator
</center>

<form name="calculator">
<br><br><br><br><br><br><br><br><br><br>

<center>
<table>
<tr bgcolor="light blue">

<td colspan="4">

<input type="text" name="display" id="display" disabled>


</td>
</tr>

<tr bgcolor="blue">
<td>
<input type="button" name="one" value="1" onclick="calculator.display.value +=
'1'"></td>
<td><input type="button" name="two" value="2" onclick="calculator.display.value +=
'2'"></td>
<td><input type="button" name="three" value="3" onclick="calculator.display.value
+= '3'"></td>
<td><input type="button" class="operator" name="plus" value="+"
onclick="calculator.display.value += '+'"></td>
</tr>
<tr bgcolor="blue">
<td><input type="button" name="four" value="4" onclick="calculator.display.value +=
'4'"></td>
<td><input type="button" name="five" value="5" onclick="calculator.display.value +=
'5'"></td>
<td><input type="button" name="six" value="6" onclick="calculator.display.value +=
'6'"></td>
<td><input type="button" class="operator" name="minus" value="-"
onclick="calculator.display.value += '-'"></td>
</tr>
<tr bgcolor="blue">
<td><input type="button" name="seven" value="7" onclick="calculator.display.value
+= '7'"></td>
<td><input type="button" name="eight" value="8" onclick="calculator.display.value
+= '8'"></td>
<td><input type="button" name="nine" value="9" onclick="calculator.display.value +=
'9'"></td>
<td><input type="button" class="operator" name="times" value="x"
onclick="calculator.display.value += '*'"></td>
</tr>
<tr bgcolor="blue">
<td><input type="button" id="clear" name="clear" value="c"
onclick="calculator.display.value = ''"></td>
<td><input type="button" name="zero" value="0"
onclick="calculator.display.value += '0'"></td>
<td><input type="button" name="doit" value="="
onclick="calculator.display.value = eval(calculator.display.value)"></td>
<td><input type="button" class="operator" name="div" value="/"
onclick="calculator.display.value += '/'"></td>
</tr>
</table>
</center>
</form>
</body>
</head>
</html>
?

You might also like