War Room

Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Adsense / PPC / SEO Discussion Forum

Featured Warrior Special Offer...
"Members Of The *War Room* Discover Secrets To Immediate Success!"
Reply
 
LinkBack Thread Tools
Old 10-26-2009, 10:12 PM   #1
HyperActive Warrior
 
Join Date: Jan 2009
Location: Oregon
Posts: 161
Thanks: 34
Thanked 8 Times in 7 Posts
Social Networking View Member's Myspace Profile  View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Default Quick Java ?

Hey Guys,

I'm looking for the javascript code that will update the date on a landing page.

The closest I could find was

Code:
<div style="color:Black;">
<script type="text/javascript">
var d=new Date()
var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
document.write(weekday[d.getDay()] + " ")
document.write(d.getDate() + ". ")
document.write(monthname[d.getMonth()] + " ")
document.write(d.getFullYear())
</script>
</div>
The only problem is, I can't figure out how to change the font style or bold it. Does anyone know how to do this,or know of a better code? Thanks in advance

Read My Thoughts
Tim Scott's Blog
TimScott is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-27-2009, 09:33 AM   #2
HyperActive Warrior
 
Join Date: Feb 2007
Location: , , .
Posts: 290
Thanks: 14
Thanked 18 Times in 17 Posts
Default Re: Quick Java ?

You can just use old-fashioned html before and after the
javascript. Yes, you can use the document.write to add
it if you wish. Here is an example of a big, bold, arial, red
date using good old fashioned html and skip the <div>:

<big><b><font size="6" color="red" face="arial">
<script type="text/javascript">
var d=new Date()
var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thu rsday","Friday","Saturday")
var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","A ug","Sep","Oct","Nov","Dec")
document.write(weekday[d.getDay()] + " ")
document.write(d.getDate() + ". ")
document.write(monthname[d.getMonth()] + " ")
document.write(d.getFullYear())
</script>
</font>
</b></big>

You might have been under the impression that the javascript
ignores previous defined fonts. A clue would have been to look
at the <div> style just before.

Just change the font size, color, font to whatever. Keep in mind
fancy fonts may not be recognized.

You could also change it using the div tag.

My opinion is to leave it default black/font as is.

Paul

paulgl is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to paulgl For This Useful Post:
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Adsense / PPC / SEO Discussion Forum

Tags
java, quick

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 08:48 PM.