™» CGC Blog «™ Tạo widget danh ngôn trong ngày để đặt lên blog cũng là một trong những đề tài của cộng đồng Blogger. Một số trang web cung cấp widget danh ngôn ngẫu nhiên, danh ngôn trong ngày. Nếu bạn sử dụng các widget này thì chỉ việc gắn các đoạn code được cung cấp vào blog của bạn, tuy nhiên có một điều là bạn
không thể tự ý chỉnh sửa nội dung danh ngôn theo ý mình.
Có một cách khắc phục điều này là sử dụng ngôn ngữ Javascript để tạo một widget độc lập cho blog của bạn mà không cần nhờ đến website thứ 3.
Đối với Blogger, bạn chỉ cần đặt đoạn code dưới đây vào trong một tiện ích HTML/JavaScript là có thể thành công. Lưu ý ở đây sử dụng thủ thuật hiển thị mỗi ngày một câu danh ngôn (quote) kèm theo tác giả (author) tương ứng. Trong đoạn code mẫu là những câu danh ngôn bằng tiếng Anh. Bạn nên thay thế bằng những câu danh ngôn tiếng Việt mà bạn thích kèm theo tác giả của câu danh ngôn đó.
<table border="1" bordercolor="#ADD8E6" cellpadding="20" width="200" bgcolor="#dff6ff" title="Danh ngôn chọn lọc"><tr><td><a target="_blank" href="http://huynh-nhat-ha.blogspot.com/2010/10/tao-widget-danh-ngon-trong-ngay-bang.html">Danh ngôn trong ngày</a><p></p><p></p>
< script language="javascript" type="text/javascript">
var d=new Date();
var quotes=new Array(31);
var authors=new Array(31);
quotes[0]="If a man watches three football games in a row, he should be declared legally dead.";
quotes[1]="Friendship is far more tragic than love. It lasts longer.";
quotes[2]="Advice is like castor oil, easy enough to give but dreadful uneasy to take.";
quotes[3]="Never trust men with short legs. Brains too near their bottoms.";
quotes[4]="Fame is failure disguised as money.";
quotes[5]="I always wait for The Times each morning. I look at the obituary column, and if I'm not in it, I go to work.";
quotes[6]="I just came from a pleasure trip: I took my mother-in-law to the airport.";
quotes[7]="Too bad that all the people who know how to run the country are busy driving taxicabs and cutting hair.";
quotes[8]="The success of the marriage comes after the failure of the honeymoon.";
quotes[9]="Husbands are like fires. They go out when unattended.";
quotes[10]="If one hears bad music, it is one's duty to drown it in conversation.";
quotes[11]="Being right half the time beats being half-right all the time.";
quotes[12]="If you do not know where you are going, every road will get you nowhere.";
quotes[13]="My wife is a light eater. As soon as it's light, she starts eating.";
quotes[14]="A door is what a dog is perpetually on the wrong side of.";
quotes[15]="Never trust a husband too far or a bachelor too near.";
quotes[16]="I can resist everything except temptation.";
quotes[17]="Education is not the filling of a pail, but the lighting of a fire.";
quotes[18]="Every one is a moon, and has a dark side which he never shows anybody.";
quotes[19]="Man is born free; and everywhere he is in chains.";
quotes[20]="Anger is never without an argument, but seldom with a good one.";
quotes[21]="Most folks are about as happy as they make up their minds to be.";
quotes[22]="Love and scandal are the best sweeteners of tea.";
quotes[23]="To find a friend one must close one eye. To keep him - two.";
quotes[24]="I've made it a rule never to drink by daylight and never to refuse a drink after dark.";
quotes[25]="When I read about the evils of drinking, I gave up reading.";
quotes[26]="When work is a pleasure, life is a joy! When work is duty, life is slavery.";
quotes[27]="She used to diet on any kind of food she could lay her hands on.";
quotes[28]="An uneasy conscience is a hair in the mouth.";
quotes[29]="Bigamy is having one wife too many. Monogamy is the same.";
quotes[30]="My idea of an agreeable person is a person who agrees with me.";
authors[0]="Erma Bombeck";
authors[1]="Oscar Wilde";
authors[2]="Josh Billings";
authors[3]="Noel Coward";
authors[4]="Brendan Behan";
authors[5]="A. E. Matthews";
authors[6]="Henny Youngman";
authors[7]="George Burns";
authors[8]="G. K. Chesterton";
authors[9]="Zsa Zsa Gabor";
authors[10]="Oscar Wilde";
authors[11]="Malcolm Forbes";
authors[12]="Henry Kissinger";
authors[13]="Henny Youngman";
authors[14]="Ogden Nash";
authors[15]="Helen Rowland";
authors[16]="Oscar Wilde";
authors[17]="William Butler Yeats";
authors[18]="Mark Twain";
authors[19]="Jean-Jacques Rousseau";
authors[20]="Lord Halifax";
authors[21]="Abraham Lincoln";
authors[22]="Henry Fielding";
authors[23]="Norman Douglas";
authors[24]="H. L. Mencken";
authors[25]="Henny Youngman";
authors[26]="Maxim Gorky";
authors[27]="Arthur 'Bugs' Baer";
authors[28]="Mark Twain";
authors[29]="Oscar Wilde";
authors[30]="Benjamin Disraeli";
document.write(quotes[d.getDate()-1] + '<p style="text-align: right"><i>' + authors[d.getDate()-1] + '</i></p>');</script><noscript>You need to enable JavaScript to read this.</noscript></td></tr></table>
Chúc các bạn thành công !
Nguồn : thuthuatblogger.info
Copy : CGC Blog
Khi copy, các bạn nhớ ghi rõ nguồn gốc. Xin chân thành cảm ơn!

5 Bình Luận:
Whether you are searching for specialty styling products or specific Loreal hair products, you are sure to find what you need.
s Therapy Treatment line, which is a lightweight replenishing treatment that protects and maintains hair condition.
A well groomed woman will look to her hair and makeup first and a poll of 3,
000 females across the UK revealed that about 44% feel attractive if they are having a good hair day, this compares to 16% who felt pleased with their appearance if good
teeth gave them that winning smile.
There are so many ways to use brick, block, slabs, rocks, gravel and
other stone formations. The more vulnerable the global
economy looks, the greater the demand for gold and silver.
Thanks for reading this article about Oregon gem mining on
Associatedcontent.
Reporting of factual information in a free and fair manner is the very essence of this profession.
Or, when we speak of American capitalism, do we mean jobs for our people, medical care for all of us,
decent wages and decent retirements. Current newspapers provide different articles
in the development of the nation. But Punjabi news paper has the upper hand because almost population speaks
Punjabi, the official language of Punjab. This also means that you trust those who have already used
the products and know how they are used.
Feel free to surf to my web blog: click here
At that time, I was a very ordinary promoter at a small company, of course, I earned not much money
which was just enough to support myself. Andrews allegedly
sold apartments of for a non-existent Turkish Mediterranean resort in partnership with his brother Nigel
and sister-in-law Margaret. Located within blocks of the train station where the Tren a las
Nubes departs, this stretch of 7 or 8 blocks
began 100 years ago as the cultural centre
of the city, unfortunately falling into disrepair over the
years, then only to be rescued 10 years ago by the city's current mayor. Different from other girls, she did not wear the very sexy short dress and very high-heeled shoes, she only wore a white skirt, which suited her slim figure very much, and her hair was very straight, she had white and smooth skin, a pair of big eyes which could speak for her, I saw the unique charm in her. She was not the type to accept poverty and illiteracy without protest.
Here is my page act in the interests of
I've learn several just right stuff here. Definitely worth bookmarking for revisiting. I surprise how a lot effort you put to make this sort of excellent informative web site.
Feel free to visit my web-site fat loss factor
Đăng nhận xét
☺ Nội quy comments của CGC Forum :
1. Comments không được sử dụng lời lẽ thiếu văn hóa, ảnh hưởng xấu đến chính trị, tổ chức, cá nhân.
2. Không được sử dụng comments với mục đích spam.
Những comments làm trái quy định sẽ bị xóa...!
Xin cảm ơn các bạn đã đóng góp comments và tuân thủ nội quy của blog !
Notice by Admin