<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
var productInputs = document.querySelectorAll('.product-quantity');
var totalField = document.getElementById('your-total');
function updateTotal() {
var productPrices = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
var total = 0;
productInputs.forEach(function(input, index) {
var quantity = input.value;
total += productPrices[index] * quantity;
});
totalField.value = total.toFixed(2);
}
productInputs.forEach(function(input) {
input.addEventListener('input', updateTotal);
});
});
</script>