Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Adsense / PPC / SEO Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 10-26-2009, 10:12 PM   #1
Hot Dogg Struttin Floozy
 
Join Date: Jan 2009
Location: Oregon
Posts: 236
Thanks: 44
Thanked 17 Times in 16 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   Reply With Quote
Old 10-27-2009, 09:33 AM   #2
Plundering the Web
War Room Member
 
paulgl's Avatar
 
Join Date: Feb 2007
Location: , , .
Posts: 4,404
Thanks: 666
Thanked 999 Times in 773 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

Missed the last one? Don't be late on next freebie backlink space.
paulgl is offline   Reply With Quote
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 06:22 AM.