{ "key_pair_value_system": true, "answer_rating_count": "", "question_feedback_html": { "html_star": "", "html_star_feedback": "" }, "answer_average_rating_value": "", "answer_date_js": "2024-09-07T04:16:15-04:00", "answer_date": "2024-09-07 04:16:15", "is_docs_available": null, "is_excel_available": null, "is_pdf_available": null, "count_file_available": 0, "main_page": "student_question_view", "question_id": "9433555", "url": "\/study-help\/questions\/linking-js-file-go-to-the-tnyjulyhtml-file-in-the-9433555", "question_creation_date_js": "2024-09-07T04:16:15-04:00", "question_creation_date": "Sep 07, 2024 04:16 AM", "meta_title": "[Solved] Linking JS File Go to the tny_july.html f | SolutionInn", "meta_description": "Answer of - Linking JS File Go to the tny_july.html file in the code editor. Directly above the closing tag, insert a script eleme | SolutionInn", "meta_keywords": "linking,js,file,tny,julyhtml,code,editor,directly,closing,tag,insert,script", "question_title_h1": "Linking JS File Go to the tny_july.html file in the code editor. Directly above the closing tag, insert a script element that links to the", "question_title": "Linking JS File Go to the tny_july.html file in the code editor.", "question_title_for_js_snippet": "Linking JS File Go to the tny july html file in the code editor Directly above the closing tag, insert a script element that links to the tny timer js file Defer the loading of the script file until the web page loads JavaScript Browser Relations Go to the tny timer js file in the code editor At the top of the file, insert a statement to tell the browser to apply strict usage of the JavaScript code in the file Javascript Functions Directly above the nextJuly4() function, insert a function named showClock() that has no parameters Within the showClock() function, complete Steps below Declare a variable named thisDay that stores a Date object containing the date May 19, 2018 at 9 31 27 a m Declare a variable named localDate that contains the text of the date from the thisDay variable using local conventions Declare another variable named localTime that contains the text of the time stored in the thisDay variable using local conventions Within the inner HTML of the page element with the ID currentTime, write the following code date time where date and time are the values of the localDate and localTime variables Hector has supplied you with a function named nextJuly4() that returns the date of the next 4th of July Call the nextJuly4() function using thisDay as the parameter value and store the date returned by the function in the j4Date variable The countdown clock should count down to 9 p m on the 4th of July Apply the setHours() method to the j4Date variable to change the hours value to 9 p m ( Hint Express the value for 9 p m in 24 hour time ) Create variables named days , hrs , mins , and secs containing the days, hours, minutes, and seconds until 9 p m on the next 4th of July ( Hint Use the code from the tny script js file in the tutorial case as a guide for calculating these variable values ) Change the text content of the elements with the IDs dLeft, hLeft, mLeft, and sLeft to the values of the days, hrs, mins, and secs variables rounded down to the next lowest integer JavaScript Commands Directly after the opening comment section in the file, insert a command to call the showClock() function After the command that calls the showClock() function, insert a command that runs the showClock() function every second Document your work in this script file with comments HTML FILE tny july html Tulsa's Summer Party JS FILE tny time js New Perspectives on HTML5 and CSS3, 7th Edition C9 T4 function nextJuly4(currentDate) var cYear currentDate getFullYear() var jDate new Date( July 4, 2018 ) jDate setFullYear(cYear) if ((jDate currentDate) 0) jDate setFullYear(cYear 1) return jDate ", "question_description": "
Linking JS File<\/strong><\/p> Go to the tny_july.html<\/strong> file in the code editor. Directly above the closing <\/head> tag, insert a script element that links to the tny_timer.js file. Defer the loading of the script file until the web page loads.<\/p> <\/p> JavaScript Browser Relations<\/strong><\/p> Go to the tny_timer.js<\/strong> file in the code editor. At the top of the file, insert a statement to tell the browser to apply strict usage of the JavaScript code in the file.<\/p> Javascript Functions<\/strong><\/p> Directly above the nextJuly4() function, insert a function named showClock()<\/strong> that has no parameters. Within the showClock() function, complete Steps below.<\/p> JavaScript Commands<\/strong><\/p> Directly after the opening comment section in the file, insert a command to call the showClock() function.<\/p> After the command that calls the showClock() function, insert a command that runs the showClock() function every second.<\/p> Document your work in this script file with comments.<\/p> <\/p> -----HTML FILE: tny_july.html----<\/p> <\/p> <\/p> <\/p> <\/p> <\/p> <\/p> <\/p> <\/p> <\/p> <\/head><\/p> <\/p> ----JS FILE: tny_time.js----<\/p> \/*<\/p> New Perspectives on HTML5 and CSS3, 7th Edition<\/p> C9 T4<\/p> *\/<\/p> <\/p> <\/p> function nextJuly4(currentDate) {<\/p> var cYear = currentDate.getFullYear();<\/p> var jDate = new Date(\"July 4, 2018\");<\/p> jDate.setFullYear(cYear);<\/p> if ((jDate - currentDate) < 0) jDate.setFullYear(cYear + 1);<\/p> return jDate;<\/p> }<\/p>",
"transcribed_text": "",
"related_book": {
"title": null,
"isbn": null,
"edition": null,
"authors": null,
"cover_image": null,
"uri": null,
"see_more_uri": ""
},
"free_related_book": {
"isbn": "",
"uri": "",
"name": "",
"edition": ""
},
"question_posted": "2024-09-07 04:16:15",
"see_more_questions_link": null,
"step_by_step_answer": "The Answer is in the image, click to view ...",
"students_also_viewed": [
{
"url": "\/study-help\/introduction-to-probability-statistics\/1131-refer-to-exercise-1128-find-a-95-confidence-interval-1987481",
"description": "11.31 Refer to Exercise 11.28. Find a 95% confidence interval for the difference between a pair of treatment means A and B if x = 21.9 and x = 24.2.",
"stars": 0
},
{
"url": "\/amanda-webb-opened-a-home-health-care-business-under-the",
"description": "Amanda Webb opened a home health care business under the name Home Care Inc. During its first month of operations, the business had the following transactions: a. Sold common stock to Ms. Webb and...",
"stars": 3
},
{
"url": "\/study-help\/questions\/hours-27-minutes-per-hour-600-cost-270-during-9963147",
"description": "Hours 27 minutes per Hour $6.00 Cost $ 2.70 During August 9,605 hours of direct labor time were needed to make 19.700 units of the Jogging Mate. The direct labor cost totaled $56.670 for the month....",
"stars": 3
},
{
"url": "\/study-help\/questions\/the-average-price-of-new-homes-is-138500-if-new-8107087",
"description": "The average price of new homes is $138,500. If new home prices are increasing at a rate of 15% per year, how much will a new home cost in 12 years?",
"stars": 3
},
{
"url": "\/study-help\/questions\/4-relation-between-f-and-r-in-our-notes-we-1009650",
"description": "4. Relation between F and R. In our notes, we claim that F has an alternative expression (SSRR - SSRU)\/#r F SSRU\/(n - K) 1 ermitted where SSRR is the sum squared residuals from the restricted...",
"stars": 3
},
{
"url": "\/study-help\/questions\/why-must-crime-scene-notes-be-taken-in-pen-in-999765",
"description": "Why must crime scene notes be taken in pen in a hard-bound notebook? (note: there may be more then 1 correct answer) a. The lead from a pencil can be poisonous b. Spiral bound notebooks are just not...",
"stars": 3
},
{
"url": "\/study-help\/questions\/the-20-kg-block-is-subjected-to-a-force-of-1026377",
"description": "The 20 kg block is subjected to a force of F 580 N acting at an angle of 35 and a force of F2 = 410 N acting in the negative x direction = while in contact with a smooth surface. Assume the box can...",
"stars": 3
},
{
"url": "\/study-help\/questions\/what-would-be-the-result-of-the-following-code-being-999758",
"description": "What would be the result of the following code being executed? class Main { public static void main(String args) { System.out.println(\"Learning Java is fun\"); } } a.) We would get an error as there...",
"stars": 3
},
{
"url": "\/study-help\/questions\/for-the-beam-shown-find-the-reactions-at-the-supports-1029789",
"description": "For the beam shown, find the reactions at the supports and plot the shear-force and bending-moment diagrams. V1 = 700 lbf, V2=43 lbf\/in, V3 = 8 in, and V4 = 6 in. v3 v2 v4 v4 Provide values at all...",
"stars": 3
}
],
"next_back_navigation": {
"previous": "\/study-help\/questions\/in-general-journal-form-record-adjusting-entries-for-the-following-9433554",
"next": "\/study-help\/questions\/the-following-transactions-were-completed-by-the-company-a-the-9433556"
},
"breadcrumbs": [
{
"name": "Study help",
"link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers"
},
{
"name": "Computer Science",
"link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers\/computer-science"
},
{
"name": "Databases",
"link": "https:\/\/www.solutioninn.com\/study-help\/questions\/computer-science-databases"
},
{
"name": "Linking JS File Go to the tny_july.html file in the code editor.",
"link": "https:\/\/www.solutioninn.com\/study-help\/questions\/linking-js-file-go-to-the-tnyjulyhtml-file-in-the-9433555"
}
],
"skill_details": {
"skill_id": "656",
"skill_name": "Databases",
"parent_id": "8"
}
}