hehe,这谚语显示的界面不错,可惜不是存储啊DB中,条数没法增多

博客展示了一段背单词界面的代码,定义了英语谚语数组和对应的中文翻译数组,通过函数实现英语谚语及翻译的轮流显示,还设置了样式,包括界面边框、背景色、字体等样式。
显示效果,点 这里
(刚才我使用HTML编辑,直接使用iFrame将外部的页面嵌入这里,保存,然后灾进行编辑的时候,竟然使得IE出现问题,试了几次都是这样,怎么搞的嘛!)
代码:
 1 None.gif < div  id =SEng  class ="Econtent" >< img  src ="zd.gif"  align ="absmiddle" >   < span  class =EnText ></ span >< div  class =ChText ></ div ></ div >< div  style ="height:5px;overflow:hidden" ></ div >
 2 ExpandedBlockStart.gifContractedBlock.gif < script > dot.gif
 3InBlock.gif//-------------背单词------------
 4InBlock.gifvar En=new Array()
 5InBlock.gifvar Ch=new Array()
 6InBlock.gifvar Ei=0
 7ExpandedSubBlockStart.gifContractedSubBlock.giffunction showE(first)dot.gif{
 8InBlock.gifif (first!=1) SEng.filters[0].apply();
 9InBlock.gifSEng.innerHTML="<img src='zd.gif' align='absmiddle'> <span class=EnText>"+En[Ei]+"</span><div class=ChText>"+Ch[Ei]+"</div>"
10InBlock.gifif (first!=1) SEng.filters[0].play();
11InBlock.gifEi++
12ExpandedSubBlockStart.gifContractedSubBlock.gifif (Ei==En.length) dot.gif{Ei=0}
13ExpandedSubBlockEnd.gif}

14InBlock.gif
15InBlock.gifEn[0]='A man,a horse,and a dog are never weary of each others company.'
16InBlock.gifCh[0]='人、马、狗可以永远相伴不厌倦。'
17InBlock.gifEn[1]='A well-Prepared mind hopes in adversity and fears in prosperity.'
18InBlock.gifCh[1]='遇事有准备的人逢逆境不失望,处顺境不大意。'
19InBlock.gifEn[2]='Every man is his own enemy.'
20InBlock.gifCh[2]='人都有与自己为敌的时候. /败事全由已.'
21InBlock.gifEn[3]='Great men\'s sons soldom do well.'
22InBlock.gifCh[3]='伟人的儿子有出息的不多。'
23InBlock.gifEn[4]='Happiness is a way station between too much and too little.'
24InBlock.gifCh[4]='幸福是太多和太少之间的一站.'
25InBlock.gifEn[5]='If Jack\'s in love, he\'s no judge of Jill\'s beauty.'
26InBlock.gifCh[5]='要是杰克爱上了吉尔,吉尔再丑他也说俊俏.'
27InBlock.gifEn[6]='If you have a garden and a library, you have everything you need.'
28InBlock.gifCh[6]='如果你有一块园地和一个图书馆,那么你就拥有了你所需要的一切.'
29InBlock.gifEn[7]='Knowledge is a matter of science,and no dishonesty or conceit whatsoever is permissible.What is required is definitely the reverse--honesty and modesty.'
30InBlock.gifCh[7]='知识的问题是一个科学问题,来不得半点的虚伪和骄傲,决定地需要的倒是其反面--诚实和谦逊的态度.'
31InBlock.gifEn[8]='Men at some time are masters of their fates.'
32InBlock.gifCh[8]='人有时是命运的主人.'
33InBlock.gifEn[9]='Most of the trouble in the world is caused by people wanting to be important.'
34InBlock.gifCh[9]='世界上大部分的麻烦都是要想成为伟大人物的人搞出来的。'
35InBlock.gifEn[10]='The most precious of all possessions is a wise and loyal friend.'
36InBlock.gifCh[10]='最宝贵的财富是明智而忠实的朋友.'
37InBlock.gifEn[11]='Too many cooks spoil the broth.'
38InBlock.gifCh[11]='厨师太多烧坏汤。'
39InBlock.gifEn[12]='You never know what you can do till you try.'
40InBlock.gifCh[12]='不尝试就不知道你能做什么.'
41InBlock.gifEn[13]='Better safe than sorry'
42InBlock.gifCh[13]='小心不出大错。'
43InBlock.gifEn[14]='From 4 to 4:30.'
44InBlock.gifCh[14]=' 四点到四点半。'
45InBlock.gifEn[15]='I\'ll take it'
46InBlock.gifCh[15]='我要了。'
47InBlock.gifEn[16]='He majored in Computers.'
48InBlock.gifCh[16]=' 他主修计算机。'
49InBlock.gifEn[17]='"Oh,that\'s not good."'
50InBlock.gifCh[17]=' 哦,那可不好。'
51InBlock.gifEn[18]='I\'ve got a pain in my back.'
52InBlock.gifCh[18]=' 我背疼。'
53InBlock.gifEn[19]='Please give me your advice.'
54InBlock.gifCh[19]=' 请给我提些建议。'
55ExpandedBlockStart.gifContractedBlock.gifshowE(1);window.setInterval ("showE()",10000)
</ script >< style  type ="text/css" > dot.gif
56InBlock.gif<!--
57ExpandedSubBlockStart.gifContractedSubBlock.gifbody {dot.gif}{
58InBlock.gif    margin-top: 3px;
59InBlock.gif    margin-bottom: 0px;
60ExpandedSubBlockEnd.gif}

61ExpandedSubBlockStart.gifContractedSubBlock.gif.Econtent{dot.gif}{
62InBlock.gifborder:1px #999999 solid;
63InBlock.gifpadding:4px;
64InBlock.gifbackground-color:#fafafa;
65InBlock.gifwidth:99.6%;
66InBlock.gifcursor:default;
67InBlock.giffont-family: Tahoma, Verdana, "宋体"; 
68InBlock.giffont-size: 12px; 
69InBlock.gifcolor:#333333;
70InBlock.giffilter:blendtrans(duration=.3);
71ExpandedSubBlockEnd.gif}

72ExpandedSubBlockStart.gifContractedSubBlock.gif.EnText{dot.gif}{
73InBlock.giffont-family: Verdana, "宋体"; 
74InBlock.giffont-size: 11px; 
75InBlock.gifcolor:#0000ff;
76ExpandedSubBlockEnd.gif}

77ExpandedSubBlockStart.gifContractedSubBlock.gif.ChText{dot.gif}{
78InBlock.gifpadding-left:20px;
79InBlock.gifpadding-top:4px;
80InBlock.gifborder-top:1px #cccccc solid;
81InBlock.giffont-family: "宋体"; 
82InBlock.giffont-size: 12px; 
83InBlock.gifcolor:#006600;
84InBlock.gifmargin-top:4px;
85ExpandedSubBlockEnd.gif}

86ExpandedBlockEnd.gif-->
87None.gif
</ style >

转载于:https://www.cnblogs.com/lbk/archive/2005/08/04/207601.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值