diff --git a/htdocs/index.html b/htdocs/index.html index a4d9324..37a9312 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -50,7 +50,10 @@ - + + + + Civil @@ -337,7 +340,7 @@ function updateTotal() { total += value; }); // Output the updated total to the console - console.log(total); + //console.log(total); // Display the updated total in the input box with ID "totalBox1" document.querySelector('#totalBox1').value = '$' + total.toFixed(2); } @@ -373,7 +376,8 @@ function updateTotal() { total2 += value2; }); // Output the updated total to the console - console.log(total2); + console.log(total2.toLocaleString('en-US')) + // Display the updated total in the input box with ID "totalBox2" document.querySelector('#totalBox2').value = '$' + total2.toFixed(2); } @@ -390,6 +394,10 @@ inputs2.forEach(input => { sliders2.forEach(slider => { slider.addEventListener("input", updateTotal); }); + +inputs.forEach(input => { + input.addEventListener("input", updateTotal); +}); \ No newline at end of file