|
If anyone can help me with this I would be very appreciative. I have just started this class and I feel like I am over my head big time. But I need to take this course to finish. this is one of my assignments and I am completely lost. I am not sure how to write the code for this project and I could use any help that will nudge me in the write direction to complete this. I know that this is a very long request by I won't lie to you I need your expertise on this. Thanks in advance to all who can help me!
I have to create a function named ranImg( ). Inside of the parentheses, use a parameter named num.
Then I have to return a value calculated by taking the value held by the placeholder num and add one to it. Then round the value down to the nearest integer. Now multiply this value by a randomly generated value by JavaScript.
After that I have to create a new function named genNum( ). In the first line of the function, pass the results of the ranImg( ) function to a variable named number. In the genNum( ) function, be sure to use a parameter value of 9.
In the next line of the function, use a document.write( ) method and insert the string "<img src='"+number+".gif' alt='' />" in the method.
Then I have to create a third function named showDays( ). In the first line of this function, pass all date and time information to a variable named today. In the next line of the function, pass the date and time information for September 21, 2007, 2:00 PM to a variable named proj_date.
In the next line of the function, determine the difference between the start of the Project Fair and today’s date and then convert the value into days. Pass the results of this to a variable named days_left.
Round the number of days left to the Project Fair and pass this value to a variable named display_days. Return this calculated value.
Call the function showDays( ) and pass the results of the function to a variable named day.
Place inside the header of this file a script tag and call the file asr_elem.js. Insert a closing script tag immediately after this.
Locate the script tags in the body of the file. Insert a document.write method in between these tags and write to the Web page the value held in the variable named day.
In the header of this file, link to this page the external JavaScript file named asr_elem.js.
Scroll down and in the table find the script tags placed in the table. Enter the function genNum( ) five times in between these script tags.
|