Calcul en javascript
mysteroz
Messages postés
18
Date d'inscription
Statut
Membre
Dernière intervention
-
mysteroz Messages postés 18 Date d'inscription Statut Membre Dernière intervention -
mysteroz Messages postés 18 Date d'inscription Statut Membre Dernière intervention -
Bonjour, j'ai fait un formulaire qui bien sur en clickant sur un bouton me permet d'executée une fonction de calcul mais cela ne me donne aucun résultat.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="stylesheets.css" rel="stylesheet" type="text/css" />
<script src="jscripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="jscripts/AC_ActiveX.js" type="text/javascript"></script>
<title>accueil</title>
<link href="css/stylesheets.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="css/stylesheetie6.css" />
<![endif]-->
<!--[if IE]>
<style type="text/css">
<!--
object,embed{margin:0px!important;}
html {overflow-x:hidden;}
-->
</style>
<![endif]-->
<script>
function calcul(){
var debut;
var vendu;
var res;
debut=document.forms.saisie.dsaisie.value;
vendu=document.forms.saisie.vsaisie.value;
res=document.forms.saisie.rsaisie.value;
res=debut-vendu;
</script>
</head>
<body>
<div id="holder">
<div id="header">
<img src="images/co.jpg" width="840" height="187" align="center" style="margin-left:10px;display:block;" title="">
</div>
<div id="space">
</div>
<div id="content">
<div id="left"> <br/>
<p><a href="choix.html" target="_self"><input type="button" value="tout les produits"></a></p>
<p> </p>
<p><a href="caisse.xls" target="_self"><input type="button" value="relevé de caisse"></a></p>
<p> </p>
<p><a href="produits.xls" target="_self"><input type="button" value="fiche produit"></a></p>
<p> </p>
<p><a href="horaire.html" target="_self"><input type="button" value="horaire du personnel"></a></p>
<p> </p>
<p><a href="stock.html" target="_self"><input type="button" value="stock restant"></a></p>
<p> </p>
<p><a href="majprodprix.html" target="_self"><input type="button" value="mise à jour produit et prix"></a></p>
<p> </p>
<br/>
<br/>
</div>
<br/>
<div id="right">
<h1>calcul du stock restant</h1>
<br />
<form name="saisie" action="javascript:calcul()">
Entrez le stock de départ : <input type="text" name="dsaisie"><br>
Entrez le nombre de vente : <input type="text" name="vsaisie"><br>
<input type="submit" value="envoyer">
Il reste donc : <input type="text" name="rsaisie"><br>
</form>
<br />
<br />
<br />
<br />
<br>
<br />
<br/>
<<br>
<br>
<br>
</div>
<div style="clear: both;"></div>
</div>
<div id="footer">
<p>Copyright ©</p>
</div>
<br/>
</div>
</body>
</html>
voila en vous remerciant par avance.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="stylesheets.css" rel="stylesheet" type="text/css" />
<script src="jscripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="jscripts/AC_ActiveX.js" type="text/javascript"></script>
<title>accueil</title>
<link href="css/stylesheets.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="css/stylesheetie6.css" />
<![endif]-->
<!--[if IE]>
<style type="text/css">
<!--
object,embed{margin:0px!important;}
html {overflow-x:hidden;}
-->
</style>
<![endif]-->
<script>
function calcul(){
var debut;
var vendu;
var res;
debut=document.forms.saisie.dsaisie.value;
vendu=document.forms.saisie.vsaisie.value;
res=document.forms.saisie.rsaisie.value;
res=debut-vendu;
</script>
</head>
<body>
<div id="holder">
<div id="header">
<img src="images/co.jpg" width="840" height="187" align="center" style="margin-left:10px;display:block;" title="">
</div>
<div id="space">
</div>
<div id="content">
<div id="left"> <br/>
<p><a href="choix.html" target="_self"><input type="button" value="tout les produits"></a></p>
<p> </p>
<p><a href="caisse.xls" target="_self"><input type="button" value="relevé de caisse"></a></p>
<p> </p>
<p><a href="produits.xls" target="_self"><input type="button" value="fiche produit"></a></p>
<p> </p>
<p><a href="horaire.html" target="_self"><input type="button" value="horaire du personnel"></a></p>
<p> </p>
<p><a href="stock.html" target="_self"><input type="button" value="stock restant"></a></p>
<p> </p>
<p><a href="majprodprix.html" target="_self"><input type="button" value="mise à jour produit et prix"></a></p>
<p> </p>
<br/>
<br/>
</div>
<br/>
<div id="right">
<h1>calcul du stock restant</h1>
<br />
<form name="saisie" action="javascript:calcul()">
Entrez le stock de départ : <input type="text" name="dsaisie"><br>
Entrez le nombre de vente : <input type="text" name="vsaisie"><br>
<input type="submit" value="envoyer">
Il reste donc : <input type="text" name="rsaisie"><br>
</form>
<br />
<br />
<br />
<br />
<br>
<br />
<br/>
<<br>
<br>
<br>
</div>
<div style="clear: both;"></div>
</div>
<div id="footer">
<p>Copyright ©</p>
</div>
<br/>
</div>
</body>
</html>
voila en vous remerciant par avance.
A voir également:
- Calcul en javascript
- Calcul moyenne excel - Guide
- Calcul km marche à pied gratuit - Télécharger - Sport
- Telecharger javascript - Télécharger - Langages
- Calcul charpente bois gratuit - Télécharger - Architecture & Déco
- Logiciel gratuit calcul valeur nutritionnelle - Télécharger - Santé & Bien-être