zoukankan
html css js c++ java
又一滚动图片脚本
<
center
>
<
table
border
="0"
cellpadding
="0"
cellspacing
="0"
style
="border-collapse: collapse"
width
="26%"
id
="AutoNumber1"
>
<
tr
>
<
td
width
="100%"
>
<
p
align
="center"
>
<
script
language
="JavaScript1.2"
>
var
slideshow_width
=
468
//
SET SLIDESHOW WIDTH (set to largest image's width if multiple dimensions exist)
var
slideshow_height
=
60
//
SET SLIDESHOW HEIGHT (set to largest image's height if multiple dimensions exist)
var
pause
=
3000
//
SET PAUSE BETWEEN SLIDE (2000=2 seconds)
var
dropimages
=
new
Array()
//
SET IMAGE PATHS. Extend or contract array as needed
dropimages[
0
]
=
"
http://image2.sina.com.cn/book/nzt/liv/badyq/U135P112T78D1455F1709DT20060320180025.jpg
"
dropimages[
1
]
=
"
http://image2.sina.com.cn/book/nzt/lit/paomozhixia/U3P112T78D1431F1709DT20060314145851.jpg
"
dropimages[
2
]
=
"
http://image2.sina.com.cn/book/nzt/lit/shengsipilao/U3P112T78D1406F1709DT20060308154446.jpg
"
var
droplinks
=
new
Array()
//
SET IMAGE URLs. Extend or contract array as needed
droplinks[
0
]
=
"
http://www.blueidea.com/bbs
"
droplinks[
1
]
=
"
http://www.blueidea.com
"
droplinks[
2
]
=
"
http://LeXRus.com
"
//
//NO need to edit beyond here/////////////
var
preloadedimages
=
new
Array()
for
(p
=
0
;p
<
dropimages.length;p
++
)
{
preloadedimages[p]
=
new
Image()
preloadedimages[p].src
=
dropimages[p]
}
var
ie4
=
document.all
&&
navigator.userAgent.indexOf(
"
Opera
"
)
==-
1
var
dom
=
document.getElementById
&&
navigator.userAgent.indexOf(
"
Opera
"
)
==-
1
if
(ie4
||
dom)
document.write('
<
div style
=
"
position:relative;'+slideshow_width+';height:'+slideshow_height+';overflow:hidden
"
><
div id
=
"
canvas0
"
style
=
"
position:absolute;'+slideshow_width+';height:'+slideshow_height+';top:-'+slideshow_height+'
"
></
div
><
div id
=
"
canvas1
"
style
=
"
position:absolute;'+slideshow_width+';height:'+slideshow_height+';top:-'+slideshow_height+'
"
></
div
></
div
>
')
else
document.write('
<
a href
=
"
javascript:rotatelink()
"
><
img name
=
"
defaultslide
"
src
=
"
'+dropimages[0]+'
"
border
=
0
></
a
>
')
var
curpos
=
slideshow_height
*
(
-
1
)
var
degree
=
10
var
curcanvas
=
"
canvas0
"
var
curimageindex
=
0
var
nextimageindex
=
1
function
movepic()
{
if
(curpos
<
0
)
{
curpos
=
Math.min(curpos
+
degree,
0
)
tempobj.style.top
=
curpos
}
else
{
clearInterval(dropslide)
nextcanvas
=
(curcanvas
==
"
canvas0
"
)
?
"
canvas0
"
:
"
canvas1
"
tempobj
=
ie4
?
eval(
"
document.all.
"
+
nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML
=
'
<
a href
=
"
'+droplinks[curimageindex]+'
"
><
img src
=
"
'+dropimages[curimageindex]+'
"
border
=
0
></
a
>
'
nextimageindex
=
(nextimageindex
<
dropimages.length
-
1
)
?
nextimageindex
+
1
:
0
setTimeout(
"
rotateimage()
"
,pause)
}
}
function
rotateimage()
{
if
(ie4
||
dom)
{
resetit(curcanvas)
var
crossobj
=
tempobj
=
ie4
?
eval(
"
document.all.
"
+
curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex
++
var
temp
=
'setInterval(
"
movepic()
"
,
50
)'
dropslide
=
eval(temp)
curcanvas
=
(curcanvas
==
"
canvas0
"
)
?
"
canvas1
"
:
"
canvas0
"
}
else
document.images.defaultslide.src
=
dropimages[curimageindex]
linkindex
=
curimageindex
curimageindex
=
(curimageindex
<
dropimages.length
-
1
)
?
curimageindex
+
1
:
0
}
function
rotatelink()
{
window.location
=
droplinks[linkindex]
}
function
resetit(what)
{
curpos
=
slideshow_height
*
(
-
1
)
var
crossobj
=
ie4
?
eval(
"
document.all.
"
+
what) : document.getElementById(what)
crossobj.style.top
=
curpos}
function
startit()
{
var
crossobj
=
ie4
?
eval(
"
document.all.
"
+
curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML
=
'
<
a href
=
"
'+droplinks[curimageindex]+'
"
><
img src
=
"
'+dropimages[curimageindex]+'
"
border
=
0
></
a
>
'
rotateimage()
}
if
(ie4
||
dom)
window.onload
=
startit
else
setInterval(
"
rotateimage()
"
,pause)
</
script
></
td
>
</
tr
>
</
table
>
</
center
>
<
p
>
</
p
>
<
script
language
="JavaScript"
defer
>
//
code by windy_sk <windy_sk@126.com> 20040127
var
obj_marquee
=
document.getElementById(
"
marquee
"
);
var
marquee_spd
=
4000
;
var
step_c
=
0
;
function
marquee_init()
{
var
obj_unit
=
obj_marquee.firstChild;
var
n
=
Math.ceil(parseInt(obj_marquee.style.height)
/
obj_unit.offsetHeight);
for
(
var
i
=
0
; i
<
n; i
++
) obj_marquee.appendChild(obj_unit.cloneNode(
true
));
return
;
}
function
marquee_show()
{
var
marquee_high
=
parseInt(obj_marquee.style.height);
var
step
=
marquee_high
/
10
;
if
(obj_marquee.scrollTop
>=
obj_marquee.children[
1
].offsetTop)
{
obj_marquee.scrollTop
=
0
;
marquee_show();
return
;
}
obj_marquee.scrollTop
+=
step;
if
(step_c
++
<
9
) setTimeout(
"
marquee_show()
"
,
50
);
return
;
}
marquee_init();
setInterval(
"
step_c=0;setTimeout('marquee_show()',50)
"
, marquee_spd);
</
script
>
<
table
style
="border:1px black solid;"
><
tr
><
td
>
<
div
id
="marquee"
style
="overflow:hidden;height:60px;210px;border:0px;padding:0px;"
>
<
div
style
="border:0px;padding:0px"
>
<!--
Marquee Body Head
-->
<
div
style
="height:60px;210px;font-size:12px"
>
<
a
href
="http://www.kdt.cn/kdt/introduce.php"
><
img
src
="http://www.blueidea.com/gg/kdt/206.gif"
border
="0"
style
="208px"
></
a
>
这个是广告~~~~~~~~~
</
div
>
<
div
style
="height:60px;210px;font-size:12px"
>
<
a
href
="http://www.idc2008.com/index5.htm"
><
img
src
="http://www.blueidea.com/gg/idc2008/208X33.gif"
border
="0"
style
="208px"
></
a
>
这个也是广告~~~~~~~~~~~~~~~~
</
div
>
<
div
style
="height:60px;210px;font-size:12px"
>
<
a
href
="http://www.qycity.com/"
><
img
src
="http://www.blueidea.com/gg/qycity/blueidea.gif"
border
="0"
style
="208px"
></
a
>
这个怎么还是广告??????
</
div
>
<
div
style
="height:60px;210px;font-size:12px"
>
<
a
href
="http://www.blueidea.com/bbs/viewuser.asp?username=windy2000"
><
img
src
="http://www.blueidea.com/bbs/icon/user1.gif"
border
="0"
>
Windy2000
</
a
><
br
>
也给自己做个广告~~~~~~~~~~
</
div
>
<!--
Marquee Body Bottom
-->
</
div
>
</
div
>
</
td
></
tr
></
table
>
<
br
>
<
br
><
br
><
br
><
br
><
br
>
查看全文
相关阅读:
工具网页地址
invalid comparison: java.util.ArrayList and java.lang.String——bug解决办法
打印csdn博客文章内容
git 更新远程分支列表
idea 配置 SpringBoot 热启动详解,和热启动失效解决方案
MacOS下安装RabbitMQ
Spring Boot Admin
Navicat Premium Mac 12 破解
sql查询不重复数据
org.apache.commons.lang3 jar的使用 ArrayUtils
原文地址:https://www.cnblogs.com/chengulv/p/355091.html
最新文章
装饰器习题一些基本的
整理装饰器的形成过程,背诵装饰器的固定格式
一个很适合小白Python的基础题 下面是网址 多多练习 多敲多敲 干就完了!!!!
一个超级简易爬虫
两个半小时,一份Python基础试卷,满分100,却有80%的人都不及格
一个有意思的代码,无限圈圈乌龟
万恶之源
关于java重点知识点
docker下载zookeeper并启动
网站一键变灰代码,分分钟就能学会的教程
热门文章
Docker 私有仓库搭建
Docker 删除所有容器和镜像,从头来过!
RabbitMQ 为什么需要信道?为什么不是TCP直接通信?
RabbitMQ 3.7.7 控制台详解
docker 安装rabbitMQ
微信小程序如何自定义新用户引导页
Centos7安装FastDFS
注解@Slf4j的使用
Please wait while Jenkins is getting ready to work (jenkins)
将博客搬至CSDN
Copyright © 2011-2022 走看看