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: 2070
Discussions: 200,973, Posts: 2,379,782, Members: 246,336
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
Charges against non-tippers dropped.. (8)
Is It Just Me? (3059)
The disrespect of Obama by Russian .. (48)
Delete an OS (16)
Nvidia GTX 260 problem (8)
Laptop with wireless problem. (12)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
windows vista security holes (17)
Regular Build (11)
Point and Shoot Camera Suggestions. (7)
windows 7 problem (7)
Internet Lost (5)
Multiple Restarts Required at Boot (5)
Recent Discussions
Multiple Restarts Required at Boot (5)
Point and Shoot Camera Suggestions. (7)
Delete an OS (16)
cell phone won't work (0)
Nvidia GTX 260 problem (8)
Is the PSU I received dead? (15)
Can't open Word (12)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (37)
Steam ID's, Gamertags etc... (4)
Games, Cables, PCI cards, and more fo.. (6)
Dept. of HS: NSA 'Helped' Develop Vis.. (17)
Linksys WMP54GS wireless card problem.. (5)
windows vista security holes (17)
Help getting around port 80 for camer.. (5)
Skillsoft Network+ Study Software Que.. (10)
Browsers wont load websites (3)
help me pls laptop just stopped worki.. (0)
Open With ..... Win7 (3)
Laptop with wireless problem. (12)
Internet Lost (5)
virus blocking exe. files (1)
CPU fan stops spinning randomly (11)
Modern Warfare 2: Who Bought It? (65)
Print spooler problem (16)
Kingston Bluetooth Dongle Driver (1)


All times are GMT -4. The time now is 11:10 PM.
TechIMO Copyright 2009 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