- 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
您可能关注的文档
最近下载
- 二下数学重点思维每日一练30天(15页).pdf VIP
- 27偏差管理控制程序.pdf VIP
- 2025年湘西土家族苗族自治州民族中医院医护人员招聘备考试题及答案解析.docx VIP
- 【高考真题】2024年新课标卷高考文综历史试卷(含答案).pdf VIP
- 2026年中考英语语法复习之感叹句课件.pptx VIP
- 小学-英语-冀教版(一起)-Lesson 16 An Email Is Fast教案.doc VIP
- 2022年湘西土家族苗族自治州民族中医院医护人员招聘题库及答案解析.docx VIP
- 2025中考英语语法之感叹句 课件.pptx VIP
- 2025年湘西土家族苗族自治州民族中医院医护人员招聘参考题库附答案解析.docx VIP
- 2023年湘西土家族苗族自治州民族中医院医护人员招聘考试题库及答案解析.docx VIP
原创力文档

文档评论(0)