Question: 6.8.2: Using Date methods. Assign daysPassed with the number of days passed since the world wide web was born and today. Hint: 1000 milliseconds are
6.8.2: Using Date methods.
Assign daysPassed with the number of days passed since the world wide web was born and today. Hint: 1000 milliseconds are in a second, 60 seconds are in a minute, etc.
var interestingEvents = { "Long distance telegraph": new Date(1844, 4, 24), "First telephone call": new Date(1876, 2, 10), "Microsoft founded": new Date(1975, 3, 4), "World wide web born": new Date(1989, 2, 1), "Google founded": new Date(1998, 8, 4), "Facebook website launch": new Date(2004, 1, 4) }; var interestingDate = interestingEvents["World wide web born"]; // Code also tested using date of First telephone call var daysPassed = 0;
/* Your solution goes here */
___________________________________________________________________
7.3.1: Event-driven programming.
Register the countChars event handler to handle focus changes for the textarea tag. Note: The function counts the number of characters in the textarea.
var textareaElement = document.getElementById("studentName");
function countChars(event) { document.getElementById("stringLength").innerHTML = event.target.value.length; }
/* Your solution goes here */
___________________________________________________________________
7.4.1: Form validation.
Use HTML5 validation attributes to ensure the entered age is between 18 and 120, inclusive, and the user name is 20 characters or less.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
