Question

In: Computer Science

/* Complete the TO DO comments below */ window.onload = function() { /* TODO add a...

/* Complete the TO DO comments below */

window.onload = function() {
/* TODO add a border to the header of the page
(a) a simple type selector, and
(b) the style property of the element object. */
document.querySelector('TODO').TODO = TODO;

/* TODO change the text of the h1 element by using
(a) the first-child pseudo selector, and
(b) the innerHTML property of the element object. */
document.querySelector('TODO').TODO = TODO;

/* TODO change the background-color of the section with id "inventory"
(a) the id selector, and
(b) the style property of the element object. */
document.querySelector('TODO').TODO = TODO;
  
/* TODO add more of your own changes below! */
}

Please help me

Solutions

Expert Solution

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

/* Complete the TO DO comments below */

window.onload = function() {

/* TODO add a border to the header of the page

(a) a simple type selector, and

(b) the style property of the element object. */

document.querySelector('header').style = "border:2px solid red";

/* TODO change the text of the h1 element by using

(a) the first-child pseudo selector, and

(b) the innerHTML property of the element object. */

document.querySelector('h1:first-child').innerHTML = " the first-child pseudo selector";

/* TODO change the background-color of the section with id "inventory"

(a) the id selector, and

(b) the style property of the element object. */

document.querySelector('#inventory').style = "background-color:green";

/* TODO add more of your own changes below! */

}

Below is the output :

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.


Related Solutions

Recursion and Iteration in C++ Locate the TODO comments in the hw02.h file. These comments provide...
Recursion and Iteration in C++ Locate the TODO comments in the hw02.h file. These comments provide direction on what needs to be done. // hw02.h #ifndef CSC232_HW02_H #define CSC232_HW02_H // TODO: All pre-conditions must be validated using the assert function imported from the following library. // TODO: You are not allowed to use the pow function in this assignment! #include <cassert> #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE !FALSE #endif #define USE_MAIN_INPUT_FILE FALSE #define USE_DEMO_INPUT_FILE FALSE #define...
public class CashRegisterPartTwo { // TODO: Do not modify the main method. // You can add...
public class CashRegisterPartTwo { // TODO: Do not modify the main method. // You can add comments, but the main method should look exactly like this // when you submit your project. public static void main(String[] args) { runTransaction(); } // TODO: Define the runTranscation method. // runTransaction runs the cash register process from start to finish. However, // it will not contain ALL Of the code. You are going to have to delegate some of // its functionality to...
Also please add comments on the code and complete in C and also please use your...
Also please add comments on the code and complete in C and also please use your last name as key. The primary objective of this project is to increase your understanding of the fundamental implementation of Vigenere Cipher based program to encrypt any given message based on the Vignere algorithm. Your last name must be used as the cipher key. You also have to skip the space between the words, while replicating the key to cover the entire message. Test...
I have to complete all //to do comments for the following code: /** * A ShoppingBasket...
I have to complete all //to do comments for the following code: /** * A ShoppingBasket holds zero or more Products and can provide information * about the Products. One can add Products to a ShoppingBasket during its * lifetime, reset the ShoppingBasket, create a copy which contains Products of * at least a certain value, and make various queries to the ShoppingBasket. * (Thus, the number of Products that will be stored by a ShoppingBasket object * is not...
Replace the todo comments with the right code. //Create variables to use later const int TRIG_PIN...
Replace the todo comments with the right code. //Create variables to use later const int TRIG_PIN = 9; const int ECHO_PIN = 10; const int RED_PIN = 3; const int GREEN_PIN = 5; const int BLUE_PIN = 6; float duration, distance_in_cm, distance_in_feet; void setup() { //Setup pins for correct I/O pinMode(TRIG_PIN, OUTPUT); pinMode(ECHO_PIN, INPUT); pinMode(RED_PIN, OUTPUT); pinMode(GREEN_PIN, OUTPUT); pinMode(BLUE_PIN, OUTPUT); } void loop() { //Generate the ultrasonic waves digitalWrite(TRIG_PIN, LOW); delayMicroseconds(2); digitalWrite(TRIG_PIN, HIGH); delayMicroseconds(10); digitalWrite(TRIG_PIN, LOW); //Read in the echoed...
Please complete the following code in C using the comments as instructions. Further instructions are below...
Please complete the following code in C using the comments as instructions. Further instructions are below the code. challenge.c // goal: print the environment variables to the file "env.txt", one per line // (If envp is NULL, the file should be empty, opening in write mode will do that.) // example: // inputs: // envp/environ = {"E1=2","E2=7",NULL} // outputs: // env.txt as a string would be "E1=2\nE2=7\n" // example: // inputs: // envp/environ = {NULL} or NULL // outputs: //...
Complete the code below by finishing up the tasks detailed in the comments. ArrayList<String> fruits =...
Complete the code below by finishing up the tasks detailed in the comments. ArrayList<String> fruits = new ArrayList<>(); Scanner sc = new Scanner(System.in); String fruit = "?"; while (!fruit.isEmpty()) { // prompt the user to enter a fruit // read the fruit using "sc", saving it into variable "fruit" // convert the fruit entered to lowercase // if the fruit is NOT empty and it is a new fruit, add it to ArrayList "fruits" } // display all fruits
Complete the // TODO sections in the EasyRental class. Create a method that implements an iterative...
Complete the // TODO sections in the EasyRental class. Create a method that implements an iterative sort that sorts the vehicle rentals by color in ascending order (smallest to largest) Create a method to binary search for a vehicle based on a color, that should return the index where the vehicle was found or -1 You are comparing Strings in an object not integers. Ex. If the input is: brown red white blue black -1 the output is: Enter the...
Can someone please add clear and concise comments thoroughly explaining each line of code below. Just...
Can someone please add clear and concise comments thoroughly explaining each line of code below. Just need help understanding the code, don't need to modify it. The purpose of the code is to count the frequency of words in a text file, and return the most frequent word with its count. It uses two algorithms: Algorithm 1 is based on the data structure LinkedList. It maintains a list for word frequencies. The algorithm runs by scanning every token in the...
Complete the java program. /* Note: Do not add any additional methods, attributes. Do not modify...
Complete the java program. /* Note: Do not add any additional methods, attributes. Do not modify the given part of the program. Run your program against the provided Homework2Driver.java for requirements. */ /* Hint: This Queue implementation will always dequeue from the first element of the array i.e, elements[0]. Therefore, remember to shift all elements toward front of the queue after each dequeue. */ public class QueueArray<T> { public static int CAPACITY = 100; private final T[] elements; private int...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT