Codice PHP:
<html>
    <
head>
        <
style type="text/css">
            .
corpo{
                
font-family:TahomaGenevasans-serif;
                
color:#000;
                
font-size:14px;
                
text-align:justify;
            }
            .
etichette{
                
font-weight:bold;
                
font-family:TahomaGenevasans-serif;
                
color:#000;
                
font-size:14px;
                
text-align:justify;
            }
            .
bottone{
                
font-weight:bold;
                
background-color:#00F;
                
font-family:TahomaGenevasans-serif;
                
color:#000;
                
font-size:14px;
                
text-align:justify;
            }

            .
risultato{
                
color:#00F;
                
font-family:TahomaGenevasans-serif;
                
font-size:14px;
                
text-align:justify;
            }
        </
style>
        <
title somma </title>
        <
script language="javascript" type="text/javascript"
            function 
somma() {    
                var 
a,b,r;
                
parseInt(document.sommare.a.value);
                
parseInt(document.sommare.b.value);
                
parseInt(a+b);
                
document.sommare.r.value " risultato";
            }
        
</script>
    </head>
    <body class="corpo">
        <table>
            <form method="post" name="sommare">
                <tr>
                    <td><label class="etichette" > Primo Numero: </label></td>
                    <td><input type="text" class="corpo" id="a" ></td>
                </tr>
                <tr>
                    <td><label class="etichette" > Secondo Numero: </label></td>
                    <td><input type="text" class="corpo" id="b" > </td>
                </tr>
                <tr>
                    <td><input type="button" onClick="somma()" class="bottone" value="Somma" ></td>
                </tr>
                <tr>
                    <td> <label class="etichette" >Risultato:</label> </td>
                    <td><input type="text" class="risultato" disabled="disabled" readonly="readonly" id="r"  > </td>
                </tr>
            </form>
        </table>
    </body>
</html>