...

View Full Version : Date js script



rflowers
12-05-2006, 02:26 PM
Hello to all,

I am a network manager in the UK, I have very little experience with websites, and have only started to dabble in the last few weeks. It has been a long time since my education, even though we covered a little javascript, I have forgotten pretty much all I learnt about it. :o I've had lots of anger spouts creating this site - from college, I remembered thinking 'to make a decent site, I need to use frames and nice attractive flash buttons...' Well, I met with a friend a week or so ago who designs websites for a living, and she said, 'You're doing 2 things wrong, 1, you're using frames 2, you're using flash buttons!' With that I started again using a wild assortment of tables, and I must say, i am most pleased with the site so far!

Any way, to the point. I am trying to use the; 'document.write(Date())' command, but I dont remember how to edit the text generated by this command. I would like it to appear white, and size 12 font. This is how it's appearing in my html;


<td width="220"><p>
<script type="text/javascript">

document.write(Date())

</script>
</p></td>

The time/date is appearing exactly where I want it to in my table, as i mentioned, I just want to change the size and font, as it is appearing in the default black times new roman format. Is there some code that I can add to this to change it, or is this a big requirement that I'm looking for? I apologise if i have been vague here, I lack confidence with scripting and i dont really know what i'm talking about!

Regards,

Rob

Ancora
12-05-2006, 02:57 PM
Rob:
Include a style string:


<td width="220"><p style="font-family:tahoma;font-size:14pt;color:#add8e6;background-color:#90ee90">
<script type="text/javascript">

document.write(Date())

</script>
</p></td>

rflowers
12-05-2006, 03:25 PM
Aha, simple as that. You are an absolute star, thank you very much



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum