terkini
08-17-2006, 10:25 AM
Hi guys, I am new here and this is my first posting.
I have the javascript below which display a statement every hour. My problem is that I cannot make the font of the statements bold or italic. Can anybody teach me how to make the fonts bold and italic. Thank you.:)
<SCRIPT LANGUAGE="JavaScript">
<!--
var ar = new Array(".",
".",
".",
".",
".",
".",
".",
".",
"It is your attitude at the beginning of a task more than anything else, that will determine our success or failure.",
"It is our attitude toward life that will determine life's attitude towards you. Despite many people's belief to the contrary, life pays no favourites.",
"You control your attitude. If you are negative, it is because you have decided to be negative and not because of other people or circumstances.",
"Act as if you have a good attitude. Remember actions triggers feelings just like feelings trigger actions.",
"Before a person can achieve the kind of results he wants, he must first become that person. He must then think, walk, talk, act and conduct himself in all of his affairs, as would the person he wishes to become.",
"Treat everybody as the most important person in the world.",
"Attitudes are based on assumptions. In order to change attitudes, one must first change one's assumptions.",
"Develop the attitude that there are more reasons why you should succeed than reasons why you should fail.",
"When you are faced with a problem, adopt the attitude that you can and will solve it.",
"We become what we think about. Control your thoughts and you will control your life.",
"Radiate the attitude of confidence, of well being, of a person who knows what he is doing. You will then find good things happening to you right away.",
"It is your attitude at the beginning of a task more than anything else, that will determine our success or failure.",
"It is our attitude toward life that will determine life's attitude towards you. Despite many people's belief to the contrary, life pays no favourites.",
".",
".",
".");
var now = new Date();
var num = now.getHours();
num %= ar.length;
document.write(ar[num]);
// -->
</SCRIPT>
I have the javascript below which display a statement every hour. My problem is that I cannot make the font of the statements bold or italic. Can anybody teach me how to make the fonts bold and italic. Thank you.:)
<SCRIPT LANGUAGE="JavaScript">
<!--
var ar = new Array(".",
".",
".",
".",
".",
".",
".",
".",
"It is your attitude at the beginning of a task more than anything else, that will determine our success or failure.",
"It is our attitude toward life that will determine life's attitude towards you. Despite many people's belief to the contrary, life pays no favourites.",
"You control your attitude. If you are negative, it is because you have decided to be negative and not because of other people or circumstances.",
"Act as if you have a good attitude. Remember actions triggers feelings just like feelings trigger actions.",
"Before a person can achieve the kind of results he wants, he must first become that person. He must then think, walk, talk, act and conduct himself in all of his affairs, as would the person he wishes to become.",
"Treat everybody as the most important person in the world.",
"Attitudes are based on assumptions. In order to change attitudes, one must first change one's assumptions.",
"Develop the attitude that there are more reasons why you should succeed than reasons why you should fail.",
"When you are faced with a problem, adopt the attitude that you can and will solve it.",
"We become what we think about. Control your thoughts and you will control your life.",
"Radiate the attitude of confidence, of well being, of a person who knows what he is doing. You will then find good things happening to you right away.",
"It is your attitude at the beginning of a task more than anything else, that will determine our success or failure.",
"It is our attitude toward life that will determine life's attitude towards you. Despite many people's belief to the contrary, life pays no favourites.",
".",
".",
".");
var now = new Date();
var num = now.getHours();
num %= ar.length;
document.write(ar[num]);
// -->
</SCRIPT>