KillerWorm, questi i risultati dopo le tue indicazioni.
Penso che il codice sia ora più "dignitoso" anche se ridondante.
lanvoel
codice:
<!doctype html>
<html lang="it">
<head><title>pulsanti</title>
<style>
#cornice {
position: relative;
width: 250px;
height: 275px;
background:RebeccaPurple;
border: 10px red double;
}
</style>
<script>
var elemento = document.getElementById("modulo")
elemento.style.border="thick solid red";
elemento.style.position="absolute";
elemento.style.top ="20";
elemento.style.left ="50";
var elemento1=document.getElementById("sfondo");
elemento1.style.backgroundColor="#fbceb1";
}
</script>
</head>
<body bgcolor='#fbceb1'>
<center>
<div id="cornice">
<form name='modulo' id='modulo'>
<input type='text' name='display' style='text-align:right; width:210px; height:20px''>
</form>
<table border=0 bgcolor=RebeccaPurple <tr>
<tr><td><input type='button' style='width:50px' value=1 onclick='document.modulo.display.value+=1'></td>
<td><input type='button' style='width:50px' value=2 onclick='document.modulo.display.value+=2'></td>
<td><input type='button' style='width:50px' value=3 onclick='document.modulo.display.value+=3'></td>
<td><input type='button' style='width:50px' value='+' onclick='document.modulo.display.value+="+"'></td></tr>
<tr><td><input type='button' style='width:50px' value=4 onclick='document.modulo.display.value+=4'></td>
<td><input type='button' style='width:50px' value=5 onclick='document.modulo.display.value+=5'></td>
<td><input type='button' style='width:50px' value=6 onclick='document.modulo.display.value+=6'></td>
<td><input type='button' style='width:50px' value='-' onclick='document.modulo.display.value+="-"'></td></tr>
<tr><td><input type='button' style='width:50px' value=7 onclick='document.modulo.display.value+=7'></td>
<td><input type='button' style='width:50px' value=8 onclick='document.modulo.display.value+=8'></td>
<td><input type='button' style='width:50px' value=9 onclick='document.modulo.display.value+=9'></td>
<td><input type='button' style='width:50px' value='*' onclick='document.modulo.display.value+="*"'></td></tr>
<tr><td><input type='button' style='width:50px' value=0 onclick='document.modulo.display.value+=0'></td>
<td><input type='button' style='width:50px' value='.' onclick='document.modulo.display.value+="."'></td>
<td><input type='button' style='width:50px' value='=' onclick='document.modulo.display.value=eval(document.modulo.display.value)'></td>
<td><input type='button' style='width:50px' value='/' onclick='document.modulo.display.value+="/"'></td></tr>
<tr><td><input type='button' style='width:50px' value='(' onclick='document.modulo.display.value+="("'></td>
<td><input type='button' style='width:50px' value=')' onclick='document.modulo.display.value+=")"'></td>
<td><input type='button' style='width:50px' value='<' onclick='document.modulo.display.value=document.modulo.display.value.substring(0,document.modulo.display.value.length-1)'></td>
<td><input type='button' style='width:50px' value='C' onclick='document.modulo.display.value=""'></td></tr>
<tr><td><input type='button' style='width:50px' value='sin' onclick='document.modulo.display.value+="Math.sin"'></td>
<td><input type='button' style='width:50px' value='cos' onclick='document.modulo.display.value+="Math.cos"'></td>
<td><input type='button' style='width:50px' value='tan' onclick='document.modulo.display.value+="Math.tan"'></td>
<td><input type='button' style='width:50px' value='PI' onclick='document.modulo.display.value+="Math.PI"'></td></tr>
<tr><td><input type='button' style='width:50px' value='asin' onclick='document.modulo.display.value+="Math.asin"'></td>
<td><input type='button' style='width:50px' value='acos' onclick='document.modulo.display.value+="Math.acos"'></td>
<td><input type='button' style='width:50px' value='atan' onclick='document.modulo.display.value+="Math.atan"'></td>
<td><input type='button' style='width:50px' value='E' onclick='document.modulo.display.value+="Math.E"'></td></tr>
<tr><td><input type='button' style='width:50px' value='exp' onclick='document.modulo.display.value+="Math.exp"'></td>
<td><input type='button' style='width:50px' value='log' onclick='document.modulo.display.value+="Math.log"'></td>
<td><input type='button' style='width:50px' value='pow' onclick='document.modulo.display.value+="Math.pow"'></td>
<td><input type='button' style='width:50px' value='sqrt' onclick='document.modulo.display.value+="Math.sqrt"'></td></tr>
<tr><td><input type='button' style='width:50px' value=',' onclick='document.modulo.display.value+=","'></td>
<td><input type='button' style='width:50px' value='round' onclick='document.modulo.display.value+="Math.round"'></td>
<td><input type='button' style='width:50px' value='floor' onclick='document.modulo.display.value+="Math.floor"'></td>
<td><input type='button' style='width:50px' value='ceil' onclick='document.modulo.display.value+="Math.ceil"'></td></tr>
</table>
</div>
</center>
</body>
</html>