Question 13 What code lines would you place before and after a set of JavaScript statements to embed them in an HTML file? <javascript>and</javascript> /* and */ script.execute; {and } <script> and </script> 2 pts
Added by Daniel C.
Close
Step 1
Step 1: The correct answer is `<script>` and `</script>`. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 82 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Instructions Version 4: In this version, we will make our site dynamic by adding some JavaScript. - myclub - assets - image1.jpg - stylesheets - mainstyle.css - js - funscript.js - mainpage.html - calendarpage.html Inside your club folder, make a folder called "js". Create an external JavaScript file that will be applied to the home page in your site. Name it "funscript.js" and save it in the "js" folder. Use a combination of document.write and prompt to ask the viewer what their major is and display the following back to them. "Great, we love xxxxx majors in this club!" **Make sure the xxxxx's are replaced with the major the viewer entered. *Must be manually coded in Notepad++
Akash M.
JavaScript Practice 1. Insert an h1 2. Insert a div and put an image inside the div. All images are to be saved in a folder called Lab7_Images. 3. Insert an h3 4. Insert an h2 5. Insert an h4 6. Insert an h6 7. Insert an h5 8. Apply style: a) Center the image by using text-align on the div. b) Give the page a background color. c) Make the h1 have text color red. d) Make all the other headings have the text color blue. Hint: You can combine into one statement: h2, h3, h4, h5, h6 { color: blue; }. 9. Playing with JavaScript Note: You can only use onclick once in an element, but you can use many JavaScript statements as the value of the onclick attribute. a) Click on the h5 and i. Change the background color of the page to a color that you select. Hint: Assign your color to document.body.style.backgroundColor. ii. Put out an alert that says: "I can change the background color!" b) Click on the h4 and change: Note: We use this.style in an assignment statement to change the style of the element you are on. i. The text color of that h4 to purple. ii. The style of that h4 to underline. c) Mouse over the image and i. Change the alignment in the div so that the image appears on the left edge of the window. Hint: You will use onmouseover in the div and use this.style.textAlign in an assignment statement. d) Click on the h2 and i. Change the size of the h6 to be 78pt. Hint: Use getElementById and give the h6 an id. ii. Change the text color of the h6 to teal. Hint: Use getElementById again. e) Mouse over the h1 and i. Change the text color to lime. Hint: Use this.style. f) Mouse off the h1 and i. Change the text color to red. Hint: Use the event handler onmouseout.
Programming in JAVASCRIPT (Some programming knowledge assumed for this exercise.) How many iterations will be carried out in the following routine?
Sets and Counting
The Addition and Multiplication Principles
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD