我想将滚动的文字加上超链接?请问各位高手指点,不胜感谢!!

来源:百度知道 编辑:UC知道 时间:2024/05/23 12:21:32
<script LANGUAGE="VBScript">
dim j,arry1(10)

arry1(0)="贵州教育学院"
arry1(1)="贵州师范大学"
arry1(2)="贵州民族学院"
arry1(3)="贵州工业大学"
arry1(4)="贵州林业学院"
arry1(5)="贵州财经学院"
arry1(6)="贵州农学院"
arry1(7)="毕节学院"
arry1(8)="贵阳学院"
arry1(9)="贵州警官学院"

Sub toplay()

j=j+4

for i=0 to 4
a(i).innertext=show1(j-1+i)

next

if j>9 then j=0
settimeout "toplay",3000
end sub

function show1(num)

if num=>10 then
show1=arry1(num-10)
else
show1=arry1(num)
end if
end function

</script>

</head>

<body onLoad="toplay()">

<p> 滚屏效果</p>
<hr>
<table border="0" align="center" cellpaddin

实现方法1:
<marquee>链接</marquee>这对标签就可实现楼主得想法。当然链接里面的内容可以是数据库读出的内容。
marquee有很多参数,附上主要得参数,供楼主参考:
方向
<direction=#> #=left, right
<marquee direction=left>啦啦啦,我从右向左移!</marquee>
<marquee direction=right>啦啦啦,我从左向右移!</marquee>

方式 <bihavior=#> #=scroll, slide, alternate
<marquee behavior=scroll>啦啦啦,我一圈一圈绕着走!</marquee>
<marquee behavior=slide>啦啦啦,我只走一次就歇了!</marquee>
<marquee behavior=alternate>啦啦啦,我来回走耶!</marquee> 啦啦啦,我一圈一圈绕着走!

实现方法2:
用javascript实现
代码如下:
<div id="demo" style="overflow:hidden;width:775px;color:#ffffff;">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td id="demo1" valign="top" align="center">
<table cellpadding="2" cellspacing="0" border="0"&