« Mailform with Captcha | Main | Apple iPad als e-book lezer »

zondag, 24 januari, 2010

iWeb : Display date & time the page was updated

Here's a quick one. Based on this question in Apple Discussions about adding the time and date the webpage was updated.

Made a false start (the solution with the textbox, etc, works) but eventually came up with this solution:

<div style="width: 340px; height: 30px; margin-left: 2px; font-family: HelveticaNeue-UltraLight, 'Helvetica Neue', Arial, sans-serif; font-size: 12px">
<script language="JavaScript" type="text/javascript">
<!--

elem = parent.document.lastModified;
document.write ("Last Updated : " + elem);
// -->
</script>
</div>

I use a <div> to wrap the code and display it with the font of the page here.

To format the time & date in JavaScript, search the internets.

Posted by wyodor at 21:14.48
Categories: Design, Tutorials, Web