title: How would I call a javascript function in html?
body: <p>I'm trying to call a function so that I can print the date on my page.</p>
  
  <p>Id like to have it show in a </p>
  
  <pre><code>&lt;p&gt;function output would go here&lt;/P&gt;
  
  function printdate()
  {
  
  var today = new date;
  
  var fulldate = document.getElementById("fulldate");
  fulldate.textContent = today.getTime();
  
  }
  </code></pre>
  
  <p>This is my full script i'm not entirely sure what I have been doing wrong or what I need to do to correct the issue.</p>
  
  <pre><code>    &lt;html&gt;
  &lt;head&gt;
  &lt;!-- 
  
     Happy New Years
     Author: Professor Myron Wilson
     Date:   8/1/2006
  
     Filename:         happynewyears.htm
     Supporting files: e.jpg, library.js, newyearseve.gif, styles.css
  --&gt;
  
  &lt;title&gt;North Pole Novelties&lt;/title&gt;
  &lt;link href="styles.css" rel="stylesheet" type="text/css" /&gt;
  &lt;!-- Add library.js below --&gt;
  
  
  
  &lt;link rel="stylesheet" type="text/css" href="Bootstrap/css/bootstrap.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;table id="npn" cellpadding="5" cellspacing="0"&gt;
  &lt;tr&gt;
  &lt;!-- Company Hyperlinks --&gt;
  &lt;td id="links" rowspan="4" valign="top"&gt;
     &lt;a href="#"&gt;The New Year's Event Agenda&lt;/a&gt;
     &lt;a href="#"&gt;&lt;/a&gt;
     &lt;a href="#"&gt;New Year's Eve Happy Hour&lt;/a&gt;
     &lt;a href="#"&gt;New Year's Eve Concert&lt;/a&gt;
     &lt;a href="#"&gt;New Year's Eve Party&lt;/a&gt;
     &lt;a href="#"&gt;New Year's Day Brunch&lt;/a&gt;
  &lt;/td&gt;
  
  &lt;!-- Days until New Year's Eve --&gt;
  
  
  &lt;td id="daycell"&gt;
  
  
  
  &lt;p id="fulldate"&gt;&lt;/p&gt;
  
  
  
  &lt;p id="Xyear"&gt;&lt;/p&gt;Days left until New Years
  
  
  
  
  
  
  
  
  &lt;script&gt;
  
  // Add script tag and declare variables and assign values
  
  
      function NYEDays(CheckDay) 
  {
     var XYear=CheckDay.getFullYear();
     var XDay=new Date("December, 31, 2014");
     XDay.setFullYear(XYear);
     var DayCount=(XDay-CheckDay)/(1000*60*60*24);
     DayCount=Math.round(DayCount);
     return DayCount;
  }
  
  function printdate()
  {
  
      var today = new date();
  
      var fulldate = document.getElementById("fulldate");
      fulldate.textContent = today.getTime();
  
  }
  
  
  
  &lt;!-- Add date output statement --&gt; 
  
  
  
  
  
  
  
  
  &lt;!-- Add decision statment for number of days --&gt;
  
      if (days &lt; 2)
  {
      alert("Almost here!")   
  }
  
  &lt;/script&gt;
  
  
  
  &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;!-- Company Logo --&gt;
  &lt;td id="logo"&gt;
     &lt;img src="newyearseve.gif" alt="New Year's Eve!" /&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;!-- Articles about the company --&gt;
  &lt;td&gt;
     &lt;table cellspacing="4" cellpadding="4"&gt;
     &lt;tr&gt;
     &lt;!-- Welcome message --&gt;
     &lt;td id="firstcol" valign="top"&gt;
        &lt;p&gt;
        NEW YEAR'S EVE ENTERTAINMENT Consider us your complete 
        New Year's Eve entertainment needs. We offer a excellent two days of events of elegance
        and style.&lt;/p&gt;
  
     &lt;!-- Latest news --&gt;
        &lt;h3&gt;NEW YEAR'S EVE HAPPY HOUR&lt;/h3&gt;
        &lt;p&gt;It starts at 5:00p.m. Mengle with everyone while consuming 
         the finest spirits and eating the best horderves. &lt;/p&gt;
  
        &lt;h3&gt;NEW YEAR'S EVE CONCERT&lt;/h3&gt;
        &lt;p&gt;When you hear the band play and the artists sing, you are hearing our concert
        At 7:00p.m., listen to some of the best groups Atlanta has to offer. &lt;/p&gt;
  
        &lt;h3&gt;NEW YEAR'S EVE PARTY&lt;/h3&gt;
        &lt;p&gt;This is the event of the year. Jam to the sounds of everyone's
        favorite radio disc jockey and bring in the new year with a bang
        starting at 10:00 p.m. &lt;/p&gt;
  
        &lt;h3&gt;NEW YEAR'S DAY BRUNCH&lt;/h3&gt;
        &lt;p&gt;There is no other way to close out the vent with a delicious brunch
        with everyone's breakfast and lunch favorites at 11:00 a.m. &lt;/p&gt;
     &lt;/td&gt;
  
     &lt;!-- Information about the company --&gt;
     &lt;td id="secondcol" valign="top"&gt;
        &lt;h3&gt;Elegance Entertainment&lt;/h3&gt;
        &lt;p&gt;
        &lt;img src="e.jpg" alt="" style="float: right; margin: 0px 0px 10px 10px" /&gt;
        Elegance Entertainment is a company that specialize in major events.
        Established in 2003, Elegance has been providing events for the professional
        market in the Atlanta area.&lt;/p&gt;
     &lt;/td&gt;
     &lt;/tr&gt;
     &lt;/table&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;!-- Contact Information --&gt;
  &lt;td id="contact"&gt;
     &lt;b&gt;Elegance Entertainment&lt;/b&gt; | 
     324 King Avenue | 
     Atlanta, GA 30332 | 
     (404) 555-2015
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;script type="text/javascript" src="library.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>