Delete script.js
This commit is contained in:
37
script.js
37
script.js
@@ -1,37 +0,0 @@
|
||||
// Sample Web Page JavaScript
|
||||
|
||||
// CTA Button functionality
|
||||
document.getElementById('ctaBtn').addEventListener('click', function() {
|
||||
alert('Welcome! Let\'s get started with your web application.');
|
||||
console.log('CTA button clicked');
|
||||
});
|
||||
|
||||
// Smooth scrolling for navigation links
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
const target = document.querySelector(this.getAttribute('href'));
|
||||
if (target) {
|
||||
target.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Contact form submission
|
||||
document.getElementById('contactForm').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
const email = this.querySelector('input[type="email"]').value;
|
||||
const message = this.querySelector('textarea').value;
|
||||
|
||||
console.log('Form submitted:', { email, message });
|
||||
alert('Thank you for your message! We will get back to you soon.');
|
||||
this.reset();
|
||||
});
|
||||
|
||||
// Log page load
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log('Page loaded successfully');
|
||||
});
|
||||
Reference in New Issue
Block a user