Question: Using JAVASCRIPT and WITHOUT changing the code please finish writting the code following the directions within the comments. Forms Lab First Name: Last Name: Email:
Using JAVASCRIPT and WITHOUT changing the code please finish writting the code following the directions within the comments.
//Name: Your name
//Program Description:
//Date:
//Turn on strict mode
"use strict";
//Use the following function, processForm, as the event handler for
//the button element with the id dispVals you will add to the form.
//Add program code to display the first name, last name, and
//email to the output element defined in the function.
function processForm(){
var output = document.getElementById("outputEl");
// Use document.getElementById and the value property of
// the three input elements to get the values from the form.
var firstName = ;
var lastName = ;
var email = ;
// Display the three values below the form.
// Use the following format:
// The firstName and lastName combined on one line.
// The email address on a new line after the names.
output.innerHTML = ;
output.innerHTML += ;
}
// Use the init function below to add a click event handler
// to the form button with the id of dispVals.
// Use the processForm function as the event handler function
function init(){
document.getElementById("").onclick = ;
}
// Sets the window onload event to use the init
// function handler.
window.onload = init;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
