Spaces:
Running
Running
Update index.html
Browse files- index.html +21 -0
index.html
CHANGED
|
@@ -377,6 +377,27 @@
|
|
| 377 |
easing: 'ease', // Easing option
|
| 378 |
once: true // Only animate elements once
|
| 379 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 380 |
</script>
|
| 381 |
</body>
|
| 382 |
</html>
|
|
|
|
| 377 |
easing: 'ease', // Easing option
|
| 378 |
once: true // Only animate elements once
|
| 379 |
});
|
| 380 |
+
document.addEventListener("DOMContentLoaded", function() {
|
| 381 |
+
const submitButton = document.getElementById("submitBtn");
|
| 382 |
+
|
| 383 |
+
submitButton.addEventListener("click", function(event) {
|
| 384 |
+
event.preventDefault(); // Prevent the default form submission
|
| 385 |
+
|
| 386 |
+
// Retrieve form data
|
| 387 |
+
const name = document.getElementById("name").value;
|
| 388 |
+
const email = document.getElementById("email").value;
|
| 389 |
+
const message = document.getElementById("message").value;
|
| 390 |
+
|
| 391 |
+
// Use Gmail API (configure your credentials)
|
| 392 |
+
// Compose the email with form data
|
| 393 |
+
// Send the email to your Gmail account
|
| 394 |
+
|
| 395 |
+
// Example: Log the form data (replace with Gmail API code)
|
| 396 |
+
console.log("Name:", name);
|
| 397 |
+
console.log("Email:", email);
|
| 398 |
+
console.log("Message:", message);
|
| 399 |
+
});
|
| 400 |
+
});
|
| 401 |
</script>
|
| 402 |
</body>
|
| 403 |
</html>
|