New Perspectives on HTML and CSS: Brief
6th Edition
ISBN: 9781133387268
Author: Patrick M. Carey
Publisher: Cengage Learning US
expand_more
expand_more
format_list_bulleted
Question
Chapter 11.1, Problem 2QC
Program Plan Intro
To provide the JavaScript code to run a function named setup () when the browser load the page. .
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Create a web page that contains three buttons and two images.
To meet the requirements follow the instructions given below
by writing JavaScript and jquery:
• When user clicks the "Hide Images" button, both images
should be vanished (jquery).
• When user clicks the "Show Images" button, both images
should be appeared again (jquery).
• When user clicks the swap button, the height of both
images should be swapped (JavaScript).
Hide Images Show Images Swap Height|
Hide Images Show Images Swap Height
Instruction : Please add some css on the alert boxes. Change the color. Thank you! The HTML code with javascript is already provided. You just need to customize the alert prompt. Thanks!
CODE:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Applying Javascript in HTML</title>
<script>
function userPrompt() {
var lastName = prompt("Enter your Last name:");
var firstName = prompt("Enter your First name:");
alert("Hello " + lastName + ", " + firstName + "!");
const number1 = parseInt(prompt("Enter your 1st number:"));
const number2 = parseInt(prompt("Enter your 2nd number:"));
const sum = number1 + number2;
alert("The sum is: " + sum);
confirm(lastName + ", " + firstName + " you have added the numbers: " + number1 + " & " + number2 + " and got the sum: " + sum + ".");
}
</script>
</head>
<body onload='userPrompt()'>…
Please help me with the following exercise.
Use your programming environment to generate a simple Web site using Python flask. The site should be unique, include at least 3 routes (e.g. 3 pages one can navigate), each route should render the HTML pages by using the render_template() functionality.
A style sheet should be included that is used by all Web pages.
Proper organization should take place of the web site including the location of templates and static pages.
Keep in the basic HTML form for a function web page includes the following components:
<!DOCTYPE html><html><head><title>Page Title</title></head><body>...your page content...</body></html>
In addition to the requirements list above the following functionality should be found within your web site on one or more web pages.• Use at least 3 different heading styles (e.g. <h1>, <h2>, <h3>)• Paragraph (<p>)• Comments <!-- -->)• Ordered list•…
Chapter 11 Solutions
New Perspectives on HTML and CSS: Brief
Ch. 11.1 - Prob. 1QCCh. 11.1 - Prob. 2QCCh. 11.3 - Provide the general code to create a function...Ch. 11.3 - Prob. 2QCCh. 11 - Prob. 1RACh. 11 - Prob. 2RACh. 11 - Prob. 3RACh. 11 - Prob. 4RACh. 11 - Prob. 5RACh. 11 - Prob. 6RA
Ch. 11 - Prob. 7RACh. 11 - Prob. 8RACh. 11 - Prob. 9RACh. 11 - Prob. 10RACh. 11 - Prob. 11RACh. 11 - Prob. 1CP1Ch. 11 - Prob. 2CP1Ch. 11 - Prob. 3CP1Ch. 11 - Prob. 4CP1Ch. 11 - Prob. 5CP1Ch. 11 - Prob. 6CP1Ch. 11 - Prob. 7CP1Ch. 11 - Prob. 8CP1Ch. 11 - Prob. 9CP1Ch. 11 - Prob. 2CP2Ch. 11 - Prob. 3CP2Ch. 11 - Prob. 5CP2Ch. 11 - Prob. 2CP3Ch. 11 - Prob. 3CP3Ch. 11 - Prob. 1CP4Ch. 11 - Prob. 2CP4Ch. 11 - Prob. 3CP4Ch. 11 - Prob. 4CP4Ch. 11 - Prob. 5CP4Ch. 11 - Prob. 6CP4Ch. 11 - Prob. 7CP4
Knowledge Booster
Similar questions
- in javascript Create a function that will load a new image from the website https://cataas.com/cat every 10 seconds, and will stop this interval when the SPACEBAR is pressed.arrow_forwardCreate JavaScript code to display the nodeName and nodeType for all nodes in the current HTML document using childNodes. Use a JavaScript object (key/value pairs) to look up the nodeType and convert the type number to a string description. Create JavaScript code to display the current window size, screen size, and location information. Use the resize event to update the display whenever the window size changes.arrow_forwardIn Javascript, Create a mouseOver event function, that will change the colour of an HTML item (i.e. a button or a list item) to green, then to black after 5 secondsarrow_forward
- Use AJAX requests and design the page with a heading and two buttons where onclicking the first button should display the list of all <empid, email> as an unorderedlist. The second button should display all the <empid, contact in the form of a table.arrow_forwardplease also put the source code (.html) and animage of the output of your pagearrow_forwardJavascript allowsWrite a page using a balloon emoji (?). When you push the up arrow, it should increase 10%, and when you press the down arrow, it should decrease 10%.Emoji are text, hence adjusting its parent element's font-size CSS property (style.fontSize) controls its size. Remember to provide a unit, such as pixels (10px)."Arrow Up" and "Arrow Down" are the arrow keys. Make sure the keys modify the balloon without scrolling.arrow_forward
- Create a login page and signup page and link them together using JAVAFX and FXML. Please show the code in order, print and image, and show the output in the answerarrow_forwardIn JavaFX: A stage with a Textfield and a button, this button opens a ListView with a contact list, the selected address must fill the TextField. The data shown in the ListView must be populated from a CSV file. Please post the code and the output screenshot.arrow_forward1. When the user clicks on a picture and it opens a window containing a zoomed version of the image, give her a hyperlink (button) to add the pic to a favorites’ area at the bottom of the first page (add img nodes to the DOM). 2. A maximum of 5 pics can be added to the favorites. After that a message is displayed to remove at least a favorite first. 3. If the user clicks on a favorite, a Remove link (button) shows up next to that picture. If the user clicks it, the pic is removed from the favorites. 4. (10% of the grade) Use good web design practices to enhance visually your html page. Add a title, picture, copyright line, etc.arrow_forward
- Imagine that the HTML file for your web page project includes a div element with the id value “cupcake” and you are writing a function to display and rearrange some images within that element. What JavaScript statement would you place in the blank to move the last image within the ccFrostingelement to the beginning of the line and shift the other images one position toward the end? let frostingFiles = ["pinkFr.jpg", "blueFr.jpg", "chocFr.jpg"] let frostingCount = frostingFiles.length; function frostCupcake() { let cupCake = document.getElementById("cupcake"); let ccFrosting = document.createElement("div"); cupCake.appendChild(ccFrosting); ccFrosting.id = "ccFrosting"; for (let i = 0; i < frostingCount; i++) { let image = document.createElement("img"); image.src = frostingFiles[i]; ccFrosting.appendChild(image); } function shuffleBack() { _____ } } a. ccFrosting.appendChild(ccFrosting.firstElementChild); b.…arrow_forwardWrite a JavaScript code with the following three different conditions: • Create the HTML document containing an element with id="myImage" for any images you want. • Use the HTML DOM to get the element with id="myImage". • Write a JavaScript function to change the JavaScript src attribute of element from " pet.gif" to " cat.jpg" when clicking on a button. Note: Students can use any gif and jpg files according to their choice. Important notes: 1. You should have to copy and paste the script as your answer to this question. DON’T take a screenshot for your script. It must be an editable script. 2. Take a screenshot of your output web page and paste it as a part of your answer.arrow_forwardWrite a JavaScript code with the following three different conditions: Create the HTML document containing an <img> element with id="myImage" for any images you want. Use the HTML DOM to get the element with id="myImage". Write a JavaScript function to change the JavaScript src attribute of <img> element from " pet.gif" to " cat.jpg" when clicking on a button. Note: Students can use any gif and jpg files according to their choice.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning