Try this:
window.onload = function() {
var d = new Date();
var weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var monthname = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
// Set your output to a variable
var output = weekday[d.getDay()] + " " + d.getDate() + ". " + monthname[d.getMonth()] + " " + d.getFullYear();
// Target the ID of the span and update the HTML
document.getElementById('spanDate').innerHTML = output;
};
Fiddle: http://jsfiddle.net/QBsWy/8/