home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

script

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1782
Discussions: 200,505, Posts: 2,374,379, Members: 245,828
Old March 7th, 2003, 11:01 PM   Digg it!   #1 (permalink)
Senior Member
 
slinky's Avatar
 
Join Date: Dec 2002
Location: cali
Posts: 914
Post
script

i dont know much about javascript so... im wondering how to change this snip to display the time formatted with a font

<SCRIPT>
document.write(Date()+".")
</SCRIPT>
slinky is offline   Reply With Quote
Old March 8th, 2003, 01:18 PM     #2 (permalink)
Member
 
Join Date: Oct 2001
Location: Midland, NC USA
Posts: 64
Say you want to use 18-point bold Arial.
Code:
<SCRIPT>
document.write '<FONT style="font-weight:bold;font-size:18pt;font-family:Arial">' +
 Date() + '.</FONT>'
</SCRIPT>

Wrapping your literal strings with single quotes helps the browser recognize that the double quotes (around the style) are intended to be part of the string.
UncaDanno is offline   Reply With Quote
Old March 9th, 2003, 01:04 AM     #3 (permalink)
Senior Member
 
slinky's Avatar
 
Join Date: Dec 2002
Location: cali
Posts: 914
doesnt work

edit: added parenthesis to ends and working!

Last edited by slinky : March 9th, 2003 at 01:08 AM.
slinky is offline   Reply With Quote
Old March 10th, 2003, 10:38 AM     #4 (permalink)
Member
 
Join Date: Oct 2001
Location: Midland, NC USA
Posts: 64
Knew I had forgotten something....
UncaDanno is offline   Reply With Quote
Old March 10th, 2003, 11:10 AM     #5 (permalink)
Ultimate Member
 
strangerstill's Avatar
 
Join Date: Oct 2001
Posts: 1,542
The font tag is evil. Use CSS.
strangerstill is offline   Reply With Quote
Old March 11th, 2003, 02:17 AM     #6 (permalink)
Senior Member
 
slinky's Avatar
 
Join Date: Dec 2002
Location: cali
Posts: 914
eh.. well since you suggested, how would that be done? (all i know is applying it to the whole page/paragraphs)
curious me
slinky is offline   Reply With Quote
Old March 11th, 2003, 10:15 AM     #7 (permalink)
Member
 
Join Date: Oct 2001
Location: Midland, NC USA
Posts: 64
Font tag evil? Sure, as long as you know that the browser in use supports CSS.

I could've sworn that all SLiNKY wanted to know was how to format a string being written to the page.
UncaDanno is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (1633)
FT HOOD attack: 7 killed 12 injured (64)
HELP!!! What do you think of this s.. (15)
Looking for a graphic card that wil.. (30)
My 1st pc build (40)
Aero in Vista (7)
core i7 extreme 975, nvidia 9400gt (9)
PC Modern Warfare 2: it's much wors.. (12)
Building my first computer (13)
How to Ship a PC (16)
slaving laptop drive (7)
[F@H SPAM 11/1/09]New month . . . n.. (33)
Windows 7 Keeps Restarting Itself (7)
Need Assistance Overclocking and Ra.. (14)
Recent Discussions
New Processor, Monitor will not turn .. (1)
HELP!!! What do you think of this sys.. (15)
FAT32 to NTFS file system in Win2kpro (2)
2009 Build (4)
Internet very slow since updating AVG.. (7)
Review My Build (2)
My 1st pc build (40)
Freezing During Music/Movies (1)
Windows Experience Index is screwed u.. (2)
ext. sound card laptop to stereo syst.. (2)
Remote Desktop via SSH and error mess.. (2)
Help and Support disappeared from my .. (0)
[F@H SPAM 11/1/09]New month . . . new.. (33)
Basic applications needed for "r.. (1)
core i7 extreme 975, nvidia 9400gt (9)
hard drive problem (2)
Win7 TrustedInstaller Permissions (2)
Speed up Win 7 boot time a bit (1)
Hard Drive test program (2)
wireless westell versalink model 327w (1)
New build 10 second reboot cycle! Won.. (3)
New Linksys Routers (2)
sometime power/Amber light (0)
Motherboards and my curse... (24)
Mic won't work. (2)


All times are GMT -4. The time now is 12:32 AM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28