Daily web design tips

Monday, February 06, 2006

Keep your website fresh

A lot of web sites are online brochures, informing visitors about your company or an area of interest, the content of these sites is updated maybe once or twice a year. This can quickly make them appear dated, and Internet users want the most up-to-date information.

To keep your web site fresh add the current date in a highly visible position on your home page. To add the date you will need to insert the below JavaScript [Define] into your home page.


<SCRIPT LANGUAGE="Javascript" class="timetext">

var now = new Date();

var days = new Array('Sunday','Monday','Tuesday','Wednesday',

'Thursday','Friday','Saturday');

var months = new Array('January','February','March','April',

'May','June','July','August','September',

'October','November','December');

var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

function y2k(number){return (number < 1000) ? number + 1900 : number;}

today = days[now.getDay()] + " " +

date + " " +

months[now.getMonth()] + ", " +

(y2k(now.getYear())) ;

document.write("" +today+ ".");

</SCRIPT>


To insert this JavaScript you will need to view the HTML [Define] of your home page, and insert it in the area you wish it to be displayed.

More web design advice

0 Comments:

Post a Comment

<< Home