Link to home
Start Free TrialLog in
Avatar of the student
the student

asked on

I am trying to show the content in console that has been entered in contact page. but this only allow me to show inner html please help

case"Contact":

console.info("Page Title: " + document.title);

// Contact page heading
let ContactMe = document.getElementById("ContactMe");
let myHeading="Contact Me";
ContactMe.textContent=myHeading;

let name = document.getElementById("name");
let email = document.getElementById("email");
let mobile = document.getElementById("phone no.");
let message = document.getElementById("message");
let submit = document.getElementById("submit");

submit.addEventListener("click",function(display){

alert("Information saved");
display.preventDefault();

console.log(name.textContent("name"));
console.log(email.textContent);
console.log(mobile.textContent);
console.log(message.textContent);

},false);
ASKER CERTIFIED SOLUTION
Avatar of David S.
David S.
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The definitive answer was given with no reply for 2 weeks.