Laurie has been instructed to add code to a Web page to display the date and time when the document was last updated Which code should she use?
Suggested Answer: B
Get Premium 1D0-735 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
26 comments · newest first
SA
Sarina
3 months ago
True, but PHP might be better for static pages.
EL
Elli
3 months ago
JavaScript is more dynamic for this task.
RO
Royal
3 months ago
I agree, but could also use PHP for server-side.
DA
Darell
4 months ago
I think it's JavaScript. Easy to implement!
DO
Dorcas
5 months ago
Simple and effective, love it!
PA
Paz
5 months ago
I thought you needed a server-side script for that?
WI
Willodean
5 months ago
Wait, does that work on all browsers?
OR
Oretha
6 months ago
Totally agree, that's the easiest way!
AM
Amie
6 months ago
You can use `document.lastModified` for that!
LU
Lucy
6 months ago
The correct answer is document.lastModified. Easy peasy!
BA
Bambi
6 months ago
Haha, I bet Laurie is wishing she had a time machine to figure this one out!
FL
Fletcher
6 months ago
Definitely use the date() function to display the last updated date.
HE
Heike
7 months ago
I think the document.lastModified property is the way to go.
JE
Jeffrey
7 months ago
The last_modified() function should do the trick.
SH
Sharita
7 months ago
I think we should use `document.lastModified` directly in the HTML, but I’m not confident about how to display it properly.
EA
Earnestine
7 months ago
I feel like we might need to format the date using `Date()` in JavaScript, but I could be mixing it up with another example.
TE
Teri
8 months ago
I remember a practice question where we had to use `document.lastModified`, but I can't recall if that's the right approach here.
CE
Cecily
8 months ago
I think we need to use JavaScript to get the last updated date, but I'm not entirely sure about the exact syntax.
FR
Franchesca
8 months ago
Okay, let me think this through. I'd probably start by researching how to get the last modified date in JavaScript, and then figure out how to display that on the page. Gotta love these tricky little exam questions!
GL
Glenn
8 months ago
I'm a bit confused on this one. Is there a specific function or method we're supposed to use, or can we kind of approach it however we want?
MA
Margart
8 months ago
Ooh, I think I remember learning about this in class. Isn't there an HTML attribute you can use to display the last updated date?
CO
Coral
9 months ago
Ugh, I'm not super familiar with JavaScript. Maybe I could try using a server-side language like PHP to get the file's last modified timestamp?
GL
Glenn
9 months ago
Hmm, this seems straightforward. I'd probably start by looking into the JavaScript Date object and see if there's a way to get the last modified date.
BR
Brent
3 months ago
Don't forget to format it nicely for the users!
MA
Marion
3 months ago
Yeah, that gives you the last modified date easily!
CO
Colette
3 months ago
I think using `document.lastModified` is the way to go.