Addition de deux nombres choisis par l'utilisateur

La page

 
+

Le code

Le code CSS

input {
  font-size:36px;
}
input[type=text] {
  text-align:right;
  width:100px;
  font-family:"Courier New", Courier, monospace;
}

Le code HTML

<table border="0" cellspacing="0" cellpadding="2" align="center" style="text-align:center; font-size:36px">
  <tr>
    <td>&nbsp;</td>
    <td><input type="text" id="nb1" value=""></td>
  </tr>
  <tr>
    <td>+</td>
    <td style="border-bottom:2px black solid"><input type="text" id="nb2" value=""></td>
  </tr>
  <tr>
    <td><input type="button" id="btn" value="="></td>
    <td><input type="text" id="somme" value="" readonly></td>
  </tr>
</table>

Le code JavaScript