Question: 8.1 in the following javascript code follow the directions in the picture Hands-on Project 8-1 Hands-on Project 8-1 New Account Information First Name Last Name
8.1 in the following javascript code follow the directions in the picture
Hands-on Project 8-1

var fname document.getBlcmntByld("fnancirput": var Inamedo cument, getElementByd"Lnaneirput var zip document.getelementByidz1pinput i (naeadvetListener) 2. Before the closing and then close index.htm: /body> tag, add the following cript element, save your changes, 3. Create a new file in your LexL editor, create a JavaScript comment section containing th ext Hands on Project 8-1, your name, todays date, and the filename script.js, and then save the file with the name script.js to the HandsOnProject8-1 folder fname.acdEventLiatener("change", createTD, ral se; lnamadventListoner ("zhange", reatelD, falsi zip . addEve:118ter.er("cherige", create!>, false) ; Hands-On Projects fr.ame .attachEvent("cr.change", reato:1 ; iname , attachEvent("crchange" , orea te ID; 1p.attaohEvent!"onchange", craateID); 12 13 14 15 if (windo.adEven Listener) I 16 17 16 }else if(window . attachEvent) 19 20 + wiriuow.dddEve:118ter.er("10d'', credteEverltListenere, alsc) 8 Save your changes to script.js, then open index.htm in your browser. Enter your name and addressor a fictitious name and address) in the form. After entering a Zip value, press Tab. The Account ID value is created automatically. 9. Open your browser console, type newAccountArray, press Enter, and then, if necessary, click object Array to view the array contents. As Figure 8-16 shows, the array contents, including the Account ID, are all elements in the newAccountarray variable. 4. Addastatement instructing processors to interpret the document contents in strict mode. Add another statement declaring a global variable named newAccountArray with an empty array as its value 5. Declare a new function named createID. Declare the local variables listed in Table 8-8, with values referencing the elements with the id values shown. Hands-On Projects 605 nd 1 8tTn it with no v mes. 6. Within the rerteID funtio, create an if statemeat that checks if the values of the elements referenced b the flare, l:ame, and zip variables are all non-null. (Hint: Check if cach valuc is not equal to an empty string (")) Add the tollowing statements to run if the condition is true: 4 :usyur't.valu -ect id; 6 for (ver i-C; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
