Write a JavaScript program that uses an HTML FORM interface to access information in arrays.
You will actually be creating three arrays: firstname, lastname, and email.
Your form should have three text fields on it. Allow a user to search the arrays based on first name, last name, or email.
If a match or matches is found the information should be output.
If no matches are found the user should be informed of this.
Example: Here is a list of 25 names. You can use these names or make up names of your own. Make sure that your search can deal properly with more than one of the same first or last name in the array.
var firstName = new Array("David","Ashley","David","Isabella","James","Elizabeth","Daniel", "Ella","Jayden","Benjamin","Addison","Abigail","Anthony","Christopher","Benjamin", "Aiden","David","Alexis","Alyssa","Ethan","Benjamin","Chloe","Emily","Emma","David"); var lastName = new Array("Anderson","Brown","Brown","Campbell","Chan","Clark","Gagnon","Johnson", "Jones","Lam","Lee","Lee","Martin","McGraw","Roy","Smith","Smith","Smith","Smith","Taylor", "Taylor","Tremblay","White","Williams","Wilson"); var email = new Array("DavidAnderson@gmail.com","AshleyBrown@gmail.com","DavidBrown@gmail.com", "IsabellaCampbell@gmail.com","JamesChan@gmail.com","ElizabethClark@gmail.com", "DanielGagnon@gmail.com","EllaJohnson@gmail.com","JaydenJones@gmail.com", "BenjaminLam@gmail.com","AddisonLee@gmail.com","AbigailLee@gmail.com", "AnthonyMartin@gmail.com","ChristopherMcGraw@gmail.com","BenjaminRoy@gmail.com", "AidenSmith@gmail.com","DavidSmith@gmail.com","AlexisSmith@gmail.com", "AlyssaSmith@gmail.com","EthanTaylor@gmail.com","BenjaminTaylor@gmail.com", "ChloeTremblay@gmail.com","EmilyWhite@gmail.com","EmmaWilliams@gmail.com", "DavidWilson@gmail.com");
|