-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdonation.js
23 lines (19 loc) · 970 Bytes
/
donation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
document.addEventListener('DOMContentLoaded', function() {
const donationForm = document.getElementById('donationForm');
donationForm.addEventListener('submit', function(event) {
event.preventDefault();
const donorName = document.getElementById('donorName').value;
const donorEmail = document.getElementById('donorEmail').value;
const donationAmount = document.getElementById('donationAmount').value;
const donationType = document.getElementById('donationType').value;
const message = document.getElementById('message').value;
console.log('Donation Submitted:');
console.log('Name:', donorName);
console.log('Email:', donorEmail);
console.log('Amount:', donationAmount);
console.log('Type:', donationType);
console.log('Message:', message);
alert('Thank you for your generous donation!');
donationForm.reset();
});
});