Define a font in Javascript (clocks,dates)

Discussion in 'Web Design & Coding' started by stubby711, Apr 15, 2005.

  1. stubby711

    stubby711 Sigh, nooblet $$

    Joined:
    Jan 22, 2005
    Messages:
    82
    Likes Received:
    1
    Location:
    UK
    Hey all, I am working on some web-page design and I want to add a clock/date feature to the page, however the script works, but the font is just TNR which is really boring, do you know of a piece of script which will enable me to change the font, thanks....:help
     
    stubby711, Apr 15, 2005
    #1
    1. Advertisements

  2. stubby711

    D Schrute Assistant Sensei VIP Member

    Joined:
    Aug 31, 2004
    Messages:
    1,201
    Likes Received:
    19
    Location:
    VA & NC
    You can change it within the script... but I am not sure what it looks like...
     
    D Schrute, Apr 15, 2005
    #2
    1. Advertisements

  3. stubby711

    stubby711 Sigh, nooblet $$

    Joined:
    Jan 22, 2005
    Messages:
    82
    Likes Received:
    1
    Location:
    UK
    LOL, I knew that, I just require the script, :eek:
     
    stubby711, Apr 17, 2005
    #3
  4. stubby711

    D Schrute Assistant Sensei VIP Member

    Joined:
    Aug 31, 2004
    Messages:
    1,201
    Likes Received:
    19
    Location:
    VA & NC
    What I am saying is I need to see the script to change it...
     
    D Schrute, Apr 17, 2005
    #4
  5. stubby711

    Nickweb Resident Filmaker Moderator

    Joined:
    Nov 7, 2003
    Messages:
    2,532
    Likes Received:
    27
    Location:
    North Wales, Britain
    i think he uses the javascriptsource, here's the date and time stamp from them:

    note: stubby, if you're not using this, i suggest you do, it's easy to change the font, just change the name, eg face='arial' to 'bankgothic'

    <!-- ONE STEP TO INSTALL DATE & TIME STAMP:

    1. Paste the coding into the BODY of your HTML document -->

    <!-- STEP ONE: Copy this code into the BODY of your HTML document -->

    <BODY>

    <CENTER>
    <SCRIPT LANGUAGE="JavaScript">

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    Stamp = new Date();
    year = Stamp.getYear();
    if (year < 2000) year = 1900 + year;
    document.write('<font size="2" face="Arial"><B>' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+ year + '</B></font><BR>');
    var Hours;
    var Mins;
    var Time;
    Hours = Stamp.getHours();
    if (Hours >= 12) {
    Time = " P.M.";
    }
    else {
    Time = " A.M.";
    }
    if (Hours > 12) {
    Hours -= 12;
    }
    if (Hours == 0) {
    Hours = 12;
    }
    Mins = Stamp.getMinutes();
    if (Mins < 10) {
    Mins = "0" + Mins;
    }
    document.write('<font size="2" face="Arial"><B>' + Hours + ":" + Mins + Time + '</B></font>');
    // End -->
    </SCRIPT>
    </CENTER>

    <p><center>
    <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>

    <!-- Script Size: 0.97 KB -->
     
    Nickweb, Apr 17, 2005
    #5
  6. stubby711

    stubby711 Sigh, nooblet $$

    Joined:
    Jan 22, 2005
    Messages:
    82
    Likes Received:
    1
    Location:
    UK
    Wow that is the one I am using! Sorry about the misunderstanding TekMan
     
    stubby711, Apr 17, 2005
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.