473,763 Members | 5,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to change font colour

DP
hi,

i've got this peice of code;

<script language= "JavaScript ">
var today = new Date();
var hourOfDay = today.getHours( );
var message = " and welcome to MIS ";
if (hourOfDay >=0 && hourOfDay < 12)
{
message="Good Morning"+messag e;
}
else if (hourOfDay < 17)
{
message="Good Afternoon"+mess age;
}
else
{
message="Good Evening"+messag e;
}

document.write (message) ;
</script>

how do i display it in 'dark blue'.

thanx

devin
Jan 17 '06 #1
3 1647
DP wrote:
i've got this peice of code;

<script language= "JavaScript ">
var today = new Date();
var hourOfDay = today.getHours( );
var message = " and welcome to MIS ";
if (hourOfDay >=0 && hourOfDay < 12)
{
message="Good Morning"+messag e;
}
else if (hourOfDay < 17)
{
message="Good Afternoon"+mess age;
}
else
{
message="Good Evening"+messag e;
}

document.write (message) ;
</script>

how do i display it in 'dark blue'.


<pre style="color:#0 03; background-color:inherit">
&lt;script language= "JavaScript"&gt ;
var today = new Date();
var hourOfDay = today.getHours( );
var message = " and welcome to MIS ";
if (hourOfDay &gt;=0 && hourOfDay &gt; 12)
{
message="Good Morning"+messag e;
}
else if (hourOfDay &lt; 17)
{
message="Good Afternoon"+mess age;
}
else
{
message="Good Evening"+messag e;
}

document.write (message) ;
&lt;/script&gt;
</pre>
HTH

PointedEars
Jan 17 '06 #2
DP
that didint do anything m8?

i cant see any text now. i'm trying to display the message bit in blue.
in a web page.

thanx

devin

"Thomas 'PointedEars' Lahn" <Po*********@we b.de> wrote in message
news:57******** ********@Pointe dEars.de...
DP wrote:
i've got this peice of code;

<script language= "JavaScript ">
var today = new Date();
var hourOfDay = today.getHours( );
var message = " and welcome to MIS ";
if (hourOfDay >=0 && hourOfDay < 12)
{
message="Good Morning"+messag e;
}
else if (hourOfDay < 17)
{
message="Good Afternoon"+mess age;
}
else
{
message="Good Evening"+messag e;
}

document.write (message) ;
</script>

how do i display it in 'dark blue'.


<pre style="color:#0 03; background-color:inherit">
&lt;script language= "JavaScript"&gt ;
var today = new Date();
var hourOfDay = today.getHours( );
var message = " and welcome to MIS ";
if (hourOfDay &gt;=0 && hourOfDay &gt; 12)
{
message="Good Morning"+messag e;
}
else if (hourOfDay &lt; 17)
{
message="Good Afternoon"+mess age;
}
else
{
message="Good Evening"+messag e;
}

document.write (message) ;
&lt;/script&gt;
</pre>
HTH

PointedEars

Jan 18 '06 #3
DP
s'ok

i sorted it now. thanx for the help.

dev

"DP" <DP@hotmail.com > wrote in message
news:ZZ******** *******@newsfe7-gui.ntli.net...
that didint do anything m8?

i cant see any text now. i'm trying to display the message bit in blue.
in a web page.

thanx

devin

"Thomas 'PointedEars' Lahn" <Po*********@we b.de> wrote in message
news:57******** ********@Pointe dEars.de...
DP wrote:
i've got this peice of code;

<script language= "JavaScript ">
var today = new Date();
var hourOfDay = today.getHours( );
var message = " and welcome to MIS ";
if (hourOfDay >=0 && hourOfDay < 12)
{
message="Good Morning"+messag e;
}
else if (hourOfDay < 17)
{
message="Good Afternoon"+mess age;
}
else
{
message="Good Evening"+messag e;
}

document.write (message) ;
</script>

how do i display it in 'dark blue'.


<pre style="color:#0 03; background-color:inherit">
&lt;script language= "JavaScript"&gt ;
var today = new Date();
var hourOfDay = today.getHours( );
var message = " and welcome to MIS ";
if (hourOfDay &gt;=0 && hourOfDay &gt; 12)
{
message="Good Morning"+messag e;
}
else if (hourOfDay &lt; 17)
{
message="Good Afternoon"+mess age;
}
else
{
message="Good Evening"+messag e;
}

document.write (message) ;
&lt;/script&gt;
</pre>
HTH

PointedEars


Jan 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
5236
by: Louise | last post by:
Hi I have written an HTML pages which does not have any colour specifying tags as far I know. When I view this in an Microsoft internet explorer browser it appears with a white background and black text but when I change Windows start menu->settings->control panel ->display -> appearance and change scheme to 'High Contrast Black' the background in the browser changes to black and the text to white. I understand that the windows scheme...
14
2666
by: Viken Karaguesian | last post by:
Hello all, It stinks being a newbie! One thing that I'm not sure about with CSS is: where is the "proper" place to put font attibutes? This has me a little confused. Take the below style sheet (which is a work in progress) as an example. If I don't put the font attributes in the <body> <p> and <td> tags, the font will not appear the way I want (when I work in FrontPage, anyway). It doesn't seem to be enough to put the font attributes in...
4
2972
by: ACaunter | last post by:
Hi there, I was wondering if there was a way to change the font color of the text in the title bar... by default the title bar is that dark blue faiding into light blue and it has white text... is it possible to change the color of that blue bar and also the color of the text, for all the people who visit the asp.net website... really i want to have the text all to be whatever color, even white, but then 1 character half way through the...
3
2143
by: Simon Gare | last post by:
Hi, trying to hide zero values by changing the colour of the font, problem is it is still printing in a light grey colour? Code below but cant work out where it is going wrong. <td width="45"<% ThisNumber = FormatNumber((DriverPayments.Fields.Item("CarParkToDriver").Value), -1, -2,
0
1596
by: Badino | last post by:
Hi, Can someone tell me what to put in this code so that if a user selects 0 (Black) then make the font white (0) as my default colour is black on my Excel spreadsheet. Private Type CHOOSECOLOUR lStructSize As Long hwndOwner As Long Hinstance As Long rgbResult As Long lpCustColors As String
3
3614
by: Johny | last post by:
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it will be seen very clearly in the picture? For example, if the picture is bright ( for example yellow), the font colour should be dark( e.g. black)...
0
1146
by: Johny | last post by:
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it will be seen very clearly in the picture? For example, if the picture is bright ( for example yellow), the font colour should be dark( e.g. black)...
3
4255
by: DNolan | last post by:
Hello, I was wondering if anyone could help me. I have an access form with tabbed pages on it. I would like the colour of the tab name to change when a user inputs information into the fields on the page, i.e when they start a new record all the tabbed pages have their name in black and when they input info into a page the font colour of the page name turns to red. This is so that they can easily see if any pages have not been updated.
3
5631
by: Phil Stanton | last post by:
Correct me if I'm wrong, but is it impossible to change the font in a report field when in print preview (MDE database) or can it only be done in design view in the MDB database. Part of my database is used to print name tags for functions, and it would be nice for the operator to have a choice of different fonts, colours and backgrounds. I have a copy of Terry Kreft and Stephen Lebans font selector mdb Thanks
6
4520
by: gavy7210 | last post by:
hello i am using struts 1.2,Eclipse Platform Version: 3.4.2,mySql 5.0.1,jdk 1.5.. i have a login form(jsp) in which a user logs in,in case he doesnt enter his username and/or password an error is displayed using the <ul> tag and <html:errors> in the jsp. in the from class a vaidate method creates an actionerrors object adds all the errors to it and finally returns it. the ids are linked in messageresources.properties and appropriate...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.