New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN: 9781305503922
Author: Patrick M. Carey
Publisher: Cengage Learning
bartleby

Concept explainers

Question
Book Icon
Chapter 11, Problem 6CP1

a)

Program Plan Intro

To create a function lightStars() and declaring a starNumber variable, to store the value of alt attribute of the target of the event object.

b)

Program Plan Intro

To declare the star variable in the function lightStars() and this variable will contain the collection of object referenced by the span#starsimg.

c)

Program Plan Intro

To declare the loop for the star collection with index range starts form 0 and will iterate for all the value which are less than the starNumber and adding image bw_star2.png to light the stars of the collection.

d)

Program Plan Intro

To declare another loop for the star collection with index range starts form starNumeber and will iterate for all the value which are less than 5 and un-lighting all the stars by the adding the image bw_star.png to the stars of the collection.

e)

Program Plan Intro

To change the value of input box with id attribute “rating” to starNumber, here starNumber value is the value of starNumber variable.

f)

Program Plan Intro

To add the mouse leave event in the lightStars() function, to unlit all the lit stars when the mouse pointer moves off.

g)

Program Plan Intro

To set the rating clicked by the userand adding an event listener to remove the turnOffStars() function.

Blurred answer
Students have asked these similar questions
Ineed CODE HTML FORM IN SAMPLE PAGE (user name,Password) And button submit WITHOUT LINK With database (only sample page) And code php page  To link HTML PAGE WITH PHP PAGE in same folder in my device method:POST For when I press submit  I can show what the value I put In username and password
USING HTML Create header text center aligned. Create an “a” tag with text that says “New User” Create a table with 4 columns namely: ID, USERNAME, EMAIL, ACTION Create at least one dummy record, you can create multiple records if you want to. ID column must be clickable EMAIL column must be italic  ACTION action must contains a clickable “Edit” followed by pipe “|” and “Delete” links. Create a form with 4 input fields namely: Username, Email, Password, and Confirm Password and 2 buttons namely: Submit and Cancel SEE EXAMPLE FIGURE 2