HTML BASED QUESTION
After the user enters the phone number, pop up a Good Luck alert message ➢ use onblur and name your function goodLuck()
❖ Add an empty paragraph just below the name field. After the user enters the name, populate the new paragraph with the text “Have we met before, ?”
❖ Add an empty paragraph just below the select field. After selecting a favorite dish, change the background color of the select paragraph and the new paragraph to a new color, and add text to the new paragraph that says “Good choice”.
❖ Add an empty paragraph just below the restaurant rating field. When the user selects 4 or below, add text to the new paragraph that says “Are you sure?”; when the user selects 6 or above, use the text “Great”.
❖ When the user clicks Reset, show an alert that says “Get it right this time!” and change the background of the page to a bright color.
❖ Add an empty paragraph just below the Submit button area. When the user clicks Submit, first check that the phone number is not empty. If it is empty, add text to the paragraph that says “Tricked you--phone number is required!” and prevent the submission. The text should be in red color, with a gray background for the paragraph. If the phone field is NOT empty, then add text to the paragraph that says “Thanks--can I call you tomorrow?”. You choose the colors for this one, but make it different than the red and gray.
****************************************************************
Here is the code i have so far
<!DOCTYPE html>
<html>
<head> Donta's Food Fusion </head>
<head lang=“en”>
<title> Donta's Food Fusion </title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<br/>
<div> Survey </div>
<div>
<br/>
<hX> Help us serve you better :
<br/>
<form>
<legend> Survey</legend>
<p>
<label> First Name: </label>
<input type="text" name="fName" />
</p>
<p>
<label> Last Name: </label>
<input type="text" name="lName" />
</p>
<p> "Have we met before <insert the name he/she typed here>?" </p>
<p>
<label> Email Address: </label>
<input type="email" name="email" />
</p>
<p>
<label> Phone Number: </label>
<input type="tel" name="phone" />
</p>
<input type="text" onblur="GoodLuck()">
<script>
function GoodLuck() {
alert("Good Luck");
}
<p>
<label>Favorite Dish:</label>
<select name="favorite">
<option>Choose your favorite dish</option>
<option>Chicken & Waffles</option>
<option>French Toast</option>
<option>Bacon Burger</option.
<option>Pizza</option>
<option>Bacon Cheese Fries</option>
<option>Bonless Wings</option>
<option>Chicken Alfredo</option>
<option>Ribeye Steak</option>
</select>
<p> "Good choice" </p>
</p>
<p>
<label>Rating of Restaurant</label>
Bad
<input type="range" min="0" max="10" step="1" name="happiness" />
Good
</p>
<p>
<label>Date: <br/>
<input type="date" .../>
</p>
<p>
<input type="time" .../>
</p>
<p>
<label> Permission to publish survey</label>
<input type="checkbox" name="yes" name="no"
</p>
<p>
<label> Comments: </label>
<textarea rows="3" cols="25">Text<textarea>
</p>
<input type="submit" />
<input type="reset"/>
</form>
<footer>
Copyright 2021 </footer>
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
- bloil Q2 Write the necessary HTML & JavaScript code to add three numbers and display the result by using a user defined function namely 'funadd'. Create a button to call the above mentioned function and pass three values while calling. Answer:arrow_forward<!DOCTYPE html><html lang="en"> below is box-styles.css <style> @import url('https://fonts.googleapis.com/css2?family=Rubik+Mono+One&display=swap'); body { font-size: 62.5%; margin: 0;} h1 {font-size:4em;text-align: center;font-family: 'Rubik Mono One', sans-serif;} h3 {font-size: 2em;} p {font-size: 1.5em;} h3, p { margin:0; } .title-padding { padding: 5% 10%; } .body-padding { padding-left: inherit; padding-right: inherit; padding-top: 7%; } .light-shadow { box-shadow: transparent; } .max-width { max-width: 50em;} /* .full-width { } */ .center-element { margin-top:8em; margin-left:inherit; margin-right: inherit; text-align: center; } .round-borders { border:1px solid black; border-radius: 0.25em; font-size: 2em; } .bb { box-sizing: content-box; width:100%; padding: inherit; margin: inherit; } .cb { box-sizing: content-box; } </style>above is the box-styles.css <head> <meta…arrow_forwardwireless network question | fill the table pleasearrow_forward
- Based on the following specification, code one webpage using HTML5, CSS and JavaScript. HTML5: Three label elements with IDs lblTarget1, lblTarget2 and lblTarget3 Two buttons with IDs btnA and btnB. Both buttons invoke function fManipulate when clicked JavaScript: Code a function named fManipulate that Accepts one parameter containing an object that represents the clicked button Check to see which of the two buttons invoked this function If fManipulate function was invoked by btnA then change the text color of lblTarget1 to red by using the getElementById method If fManipulate function was invoked by btnB then change the font of ALL three labels by first using the getElementsByTagName method to return a collection of labels then use a for loop to iterate through the collection of labels to change the font of each label to calibriarrow_forwardHTML/CSS JAVASCRIPT please help me answer this question I will give you a good rating Thank you! Given the following word search application, which searches for words in paragraphs, modify it so that it Adds two spans tab within the HTML within the designated new "Illustate" text segments as shown below. Has a new click event which searches the occurrence of the word within all span tabs residing within the first div container , then highlights the text in the span tab which contains the word c) In the same routine, count the number of times ( using a global variable) that the word is found Within the object array loop for span tabs ( where the indexOf statement is located) and after all span tabs are highlighted, send that number to a new html element ( a div, h1, span, p choice is up to you). The count should be continually accumulated and should show the total number of times a word is found in a span tab for all user activated clicks of the search button for…arrow_forward<!DOCTYPE html><html lang="en"> below is box-styles.css <style> @import url('https://fonts.googleapis.com/css2?family=Rubik+Mono+One&display=swap'); body { font-size: 62.5%; margin: 0;} h1 {font-size:4em;text-align: center;font-family: 'Rubik Mono One', sans-serif;} h3 {font-size: 2em;} p {font-size: 1.5em;} h3, p { margin:0; } .title-padding { padding: 5% 10%; } .body-padding { padding-left: inherit; padding-right: inherit; padding-top: 7%; } .light-shadow { box-shadow: transparent; } .max-width { max-width: 50em;} /* .full-width { } */ .center-element { margin-top:8em; margin-left:inherit; margin-right: inherit; text-align: center; } .round-borders { border:1px solid black; border-radius: 0.25em; font-size: 2em; } .bb { box-sizing: content-box; width:100%; padding: inherit; margin: inherit; } .cb { box-sizing: content-box; } </style>above is the box-styles.css <head> <meta…arrow_forward
- Choose: ANY keyboard event ANY mouse event and either Scroll, Resize, Focus, Blur, Select, or Change Make sure it's clear in the HTML what the user (aka ME) should be doing to trigger your events.Make 3 HTML/JavaScript files (use embeded aka <script> tags to make it easier) one for the old HTML method, the DOM Event Handler method, and the Event Listener method. They should look all the same just have the events coded differently.Subject matter can be whatever you want, the assignment is not dependent on content as it is functionality. Just make it PG, obviously! You can have fun with it. Silly is fine.arrow_forward5- Complete the following javascript function to display the style property of the document using DOM body { background-color: yellow; color: red; } Click the button to display the style properties of this document. Try it function myFunction() { }arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY