Web技术测验题.docVIP

  • 11
  • 0
  • 约2.87千字
  • 约 3页
  • 2017-08-21 发布于重庆
  • 举报
Web技术测验题.doc

一、本题中的网页逐行显示数组news中的文字。(15分,每格1分) htmlheadmeta http-equiv=Content-Type content=text/html; charset=gb2312 style !-- #tickertape{ (1) :relative;layer-background-color:black;width:400;height:12; ; font-family: 宋体; font-size: 9pt} #subtickertape{background-color:black;position:absolute;border: 1px solid black; (2) :400; (3) :12;; font-family: 宋体; font-size: 9pt} .subtickertapefont{font:bold 9pt 宋体;text-decoration:none;color:white;} .subtickertapefont a{color:white;text-decoration:none;; (4) : 宋体; (5) : 9pt} -- /style /head body (6) =#FFFFFF (7) =#000000 onload=if (document.all||document.layers) {regenerate2();update()}//设置背景色为白色,文字为黑色 div id=tickertape div id=subtickertape class=subtickertapefont初始化.../div/div script language=JavaScript1.2 //默认速度4.5秒,可以任意修改。 var speed=4500 var news=new Array() news[0]=a href=index1.htm总希望/a news[1]=a href=index2.htm在钟声响起的时刻/a news[2]=a href=index3.htm能够实现千年的愿望/a news[3]=a href=index4.htm在欢跃的人群中/a news[4]=a href=index5.htm我寻到了你/a news[5]=a href=index6.htm那些珍藏了千年的等待/a news[6]=a href=index7.htm仿佛都在此刻绽现/a //显示的信息内容可以任意按照格式添加。 i=0 if (document.all) tickerobject=document.all.subtickertape.style else tickerobject=document.tickertape.document function regenerate(){ window.location. (8) ()//重新载入内容 } function regenerate2(){ if (document.layers) setTimeout( (9) .onresize=regenerate,450)//窗口重新载入 } function update(){ BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10); if (document.layers){ document.tickertape.document.subtickertape.document.write(span class=subtickertapefont+ (10) [i]+/span) document.tickertape.document.subtickertape.document.close() }else document.all.subtickertape.innerHTML= (11) [i]//更新文字 if (inews.length-1) i++ else i=0 setTimeout(update(), (12) )//按4.5 秒的速度更新 } function BgFade(red1, grn1, blu1, red2, grn2, blu2, steps) { sred = red1; sgrn = grn1; sblu = blu1; ered = red2; egrn = grn2; eblu = blu2; inc = steps; step = 0; RunFader(); } function RunFader() { //背景色渐渐隐去 var epct = step

文档评论(0)

1亿VIP精品文档

相关文档