Question: I need some help with a small javascript program. I have built a registration form similar to the one shown in the picture. I just

I need some help with a small javascript program. I have built a registration form similar to the one shown in the picture. I just need to create a handleSubmit event listener that echos the data inputted to the console (details of output in picture).I have to keep lines 1-5in the program but the rest I wrote myself and can be changed. For some reason nothing is outputting to the console as I have it now. Please help, thanks!

form.addEventListener(\"Submit\", handleSubmit); 4 function handleSubmit(event) { 6 event.preventDefault(); // output. textContent = userInput.value; let username = document.getElementById(\"username\").value; console.log(username); 5 7 8 let email = document.getElementById(\"email\").value; console.log(\"Email: \" + email); You, seconds ago Uncommitted ch 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 let password = document.getElementById(\"password\").value; if ( email.value IL email.value == null || username.value IL username.value null || password.value \"' || password.value == null || ) { console.log(\"You must enter some data to submit this form\"); 24 25 } 26

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!