Payroll Calculator
Transportation Business Calculator
Results
// Get form input values var numVehicles = document.getElementById("num-vehicles"); var payRate = document.getElementById("pay-rate"); var hoursPerWeek = document.getElementById("hours-per-week"); var vehicleCost = document.getElementById("vehicle-cost"); var overheadCost = document.getElementById("overhead-cost"); var annualProfit = document.getElementById("annual-profit"); var revenuePerTrip = document.getElementById("revenue-per-trip"); var timePerTrip = document.getElementById("time-per-trip"); // Add event listener to form submit button var form = document.getElementById("calculator-form"); form.addEventListener("submit", function(event) { event.preventDefault(); // prevent default form submission calculate(); // call calculate function