recuperation des champs provenant un pgm en javascript
re bonjour a tous !!
g realiser une fonction en JS et j'aimerai savoir comment je peut recuperer les champs suivants : quantite, total_ht, total_ttc, total
je veut les recp dans une autre page
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <html>
<head>
<script language="javascript">
function calcul() {
document.getElementById('total_ht').value=parseFloat(document.getElementById('pu').value)*parseFloat(document.getElementById('quantite').value);
document.getElementById('total_ttc').value=parseFloat(document.getElementById('total_ht').value)*1.196;
document.getElementById('total').value=parseFloat(document.getElementById('total_ttc').value)+4.90;
}
</script>
</head>
<body>
Combien ? <input type='text' id='quantite' onChange="calcul();" onKeyUp="calcul();"><br />
<input type='hidden' id='pu' value='<%=RS("PrixHT_materiel")%>'>
Prix unitaire : <%=RS("PrixHT_materiel")%> Euro<br />
Total HT : <input type='text' id='total_ht' readonly><br />
Total TTC : <input type='text' id='total_ttc' readonly><br /><br />
Total Facture : <input type='text' id='total' readonly><br /><br />
</body>
</html> |
merci d'avance:) :)