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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
| <!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Calculatrice Javascript Simple</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="body" style="background-color:#FFF799">
<!-- appel du fichier JS-->
<script type="text/javascript" src="function_calcu.js"></script>
<!--premier formulaire password-->
<center>
<div id="title" name="titre">
Calculatrice Simple<br />
</div>
<div id="tableau" name="tableau">
<table><!-- déclaration du tableau pour la mise en forme-->
<br>
<form name="calculatrice" action="" method="get"> <!--Déclaration du début du formulaire-->
<br>
<textarea style="WIDTH: 186px; HEIGHT: 54px; TEXT-ALIGN:right;" type="texte" name="montant" id="montant"></textarea><!-- zone de détails du calcul et affichage de résultat-->
<br />
<tr>
<td><input type="button" id="division" value="/" onclick="ajout('/')"/></td><!-- déclaration des boutons de la calculatrice, avec id et l'utilisation-->
<td><input type="button" id="addition" value="+" onclick="ajout('+')"/></td> <!-- de la fonction ajout/ou resultat-->
<td><input type="button" id="soustraction" value="-" onclick="ajout('-')"/></td>
<td><input type="button" id="multiplication" value="*" onclick="ajout('*')"/></td>
<td><input type="reset" value="C"></td>
</tr>
<br />
<tr>
<td><input type="button" id="parentheseg" value="(" onclick="ajout('(')"/></td><!-- ajout des options de calcul-->
<td><input type="button" id="parenthesed" value=")" onclick="ajout(')')"/></td> <!-- de la fonction ajout/ou resultat-->
<td><input type="button" id="crochetg" value="[" onclick="ajout('[')"/></td>
<td><input type="button" id="crochetd" value="]" onclick="ajout(']')"/></td>
<td><input type="button" id="modulo" value="%" onclick="ajout('%')"></td>
</tr>
<br />
<br />
<tr>
<td><input type="button" id="zero" value="0" onclick="ajout('0')"/></td>
<td><input type="button" id="un" value="1" onclick="ajout('1')"/></td>
<td><input type="button" id="deux" value="2" onclick="ajout('2')"/></td>
<td><input type="button" id="trois" value="3" onclick="ajout('3')"/></td>
<td><input type="button" id="quatre" value="4" onclick="ajout('4')"/></td>
</tr>
<tr>
<td><input type="button" id="cinq" value="5" onclick="ajout('5')"/></td>
<td><input type="button" id="six" value="6" onclick="ajout('6')"/></td>
<td><input type="button" id="sept" value="7" onclick="ajout('7')"/></td>
<br />
<td><input type="button" id="huit" value="8" onclick="ajout('8')"/></td>
<td><input type="button" id="neuf" value="9" onclick="ajout('9')"/></td>
</tr>
</table>
<input type="button" id="egal" value="=" onclick="resultat()" style="WIDTH: 185px;">
</form>
</div>
<span id="nombres" style="background-color:#FFD940"><!-- Si une erreure ce produit lors d'un calcul, on affiche un message d'erreure-->
Calculez via le menu ci dessus vos opérations.
</span>
</center>
<div id="histo" name="historique" style="background-color:#CCC6AD">
Historique des opérations :<br>
<script language="javascript">
</script>
<br />
</div>
</body>
</html> |
Partager