calculadora.html 1.62 KB
Newer Older
roshka committed
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42
<!DOCTYPE html>
<html>
<head>
	<title>calculadora</title>
</head>
<body>
	<form>
		<table border="2px" width="200" align="center">
			<tr>
			<td colspan="4" style="height: 20px"><input type="text" name="mostrar"></td>
			</tr>
			<tr>
			<td><input type="button" value="7" name="7" onclick="mostrar.value+='7'"></td>
			<td><input type="button" value="8" name="8" onclick="mostrar.value+='8'"></td>
			<td><input type="button" value="9" name="9" onclick="mostrar.value+='9'"></td>
			<td><input type="button" value="-" name="-" onclick="mostrar.value+='-'"></td>
			</tr>
			<tr>
			<td><input type="button" value="4" name="4" onclick="mostrar.value+='4'"></td>
			<td><input type="button" value="5" name="5" onclick="mostrar.value+='5'"></td>
			<td><input type="button" value="6" name="6" onclick="mostrar.value+='6'"></td>
			<td><input type="button" value="+" name="+" onclick="mostrar.value+='+'"></td>
			</tr>
			<tr>
			<td><input type="button" value="1" name="1" onclick="mostrar.value+='1'"></td>
			<td><input type="button" value="2" name="2" onclick="mostrar.value+='2'"></td>
			<td><input type="button" value="3" name="3" onclick="mostrar.value+='3'"></td>
			<td><input type="button" value="*" name="*" onclick="mostrar.value+='*'"></td>
			</tr>
			<tr>
			<td><input type="button" value="C" name="C" onclick="mostrar.value=' '"></td>
			<td><input type="button" value="0" name="0" onclick="mostrar.value+='0'"></td>
			<td><input type="button" value="=" name="=" onclick="mostrar.value=eval(mostrar.value)"></td>
			<td><input type="button" value="/" name="/" onclick="mostrar.value+='/'"></td>
			</tr>
	</table>
		
	</form>
	

</body>
</html>