Question: 1. (1 point) In Assignment 3 Prof. Preney provided an HTML file and a CSS file and you were to write a JavaScript file to

 1. (1 point) In Assignment 3 Prof. Preney provided an HTML

1. (1 point) In Assignment 3 Prof. Preney provided an HTML file and a CSS file and you were to write a JavaScript file to allow the web browser user to interact with the boxes on the page. Without the JavaScript code the boxes were fixed in location and non-interactive. What is the name of the special JavaScript function that is called once per .js file per page to initialize JavaScript variables, etc. once a page has been loaded? 2. (2 points) Given

...

in an HTML document, write the JavaScript code to get the programmatic (i.e., JavaScript DOM) node object associated with id="abc": 3. (2 points) In JavaScript if you have the object of a JavaScript (DOM) node (e.g., the non-null return value by the function in the previous question), in a variable called obj, explain how can one set a CSS attribute, e.g., font-weight, for that node? 4. (2 points) Give the code fragment of how to set the background-color attribute to red if the JavaScript variable containing the node is called obj. 1. (1 point) In Assignment 3 Prof. Preney provided an HTML file and a CSS file and you were to write a JavaScript file to allow the web browser user to interact with the boxes on the page. Without the JavaScript code the boxes were fixed in location and non-interactive. What is the name of the special JavaScript function that is called once per .js file per page to initialize JavaScript variables, etc. once a page has been loaded? 2. (2 points) Given

...

in an HTML document, write the JavaScript code to get the programmatic (i.e., JavaScript DOM) node object associated with id="abc": 3. (2 points) In JavaScript if you have the object of a JavaScript (DOM) node (e.g., the non-null return value by the function in the previous question), in a variable called obj, explain how can one set a CSS attribute, e.g., font-weight, for that node? 4. (2 points) Give the code fragment of how to set the background-color attribute to red if the JavaScript variable containing the node is called obj

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!