Net Take-Home Pay
£0.00
per year
Pay Distribution
Total Deductions
£0.00
`;const blob = new Blob([html], { type: 'text/html' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url; a.download = 'uk-take-home-results.html';
a.click(); URL.revokeObjectURL(url);
});// Wire up all inputs
['salary','bonus','pension','student-loan','employment-type','scottish-tax','dividends'].forEach(id => {
document.getElementById(id).addEventListener('input', calculate);
document.getElementById(id).addEventListener('change', calculate);
});calculate();