Skip to content
Permalink
ac9b814517
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
22 lines (14 sloc) 771 Bytes
let emailForm = document.querySelector('#emailForm')
emailForm.addEventListener('submit', function(event){
let name = document.querySelector('input[name=name]')
let email = document.querySelector('input[name=email]')
let subject = document.querySelector('input[name=subject]')
let message = document.querySelector('input[name=message]')
if (name.value == null || name.value == "", email.value == null || email.value == "", subject.value == null || subject.value == "", message.value == null || message.value == ""){
alert("Please enter valid text");
event.preventDefault();
} else {
console.log(name.value, email.value, subject.value, message.value)
alert("Thanks for Submitting Properly!")
}
})