title: How to load a javascript function in html (span tag)
body: <p>Here I have an HTML Element:</p>
  
  <pre><code>&lt;h3&gt;Current Date: &lt;span id="spanDate"&gt;&lt;/span&gt;&lt;/h3&gt;
  </code></pre>
  
  <p>How am I able to (on)load the function below between the span tag</p>
  
  <pre><code>function aDate()
  {
  var d=new Date();
  var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  document.write(weekday[d.getDay()] + " ");
  document.write(d.getDate() + ". ");
  document.write(monthname[d.getMonth()] + " ");
  document.write(d.getFullYear());
  }
  </code></pre>
  
  <p>Thank you!</p>