Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Page info, date modified

Diederik

New Coder
Hi,

With the Ctrl I key in Firefox I get the info page of the website I'm visiting.
The info page also shows the date and time it was last modified.

Almost every site displays there the current date and time.
I know there is some HTML code and/or Javascript to display the current date and time on the info page. I wrote down the code but can't find it again.

Maybe someone has that code or Javascript?

regards,
Diederik
 
I know there is some HTML code and/or Javascript to display the current date and time on the info page.
Stolen from W3schools:
Code:
<!DOCTYPE html>
<html>
<body>

<h1>JavaScript Dates</h1>
<h2>Using new Date()</h2>
<p>new Date() without arguments, creates a date object with the current date and time:</p>

<p id="demo"></p>

<script>
const d = new Date();
document.getElementById("demo").innerHTML = d;
</script>

</body>
</html>
 
Thanks for your message.
The W3schools script does indeed display the correct date end time, but that's not what I mean.

I mean the web page info, the date and time it was last updated/modified. That's something different...
 
Back
Top Bottom