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
>
查看全文
相关阅读:
selenium之 定位以及切换frame(iframe)
selenium3+python3中的嵌套页面定位元素
selenium3+python3隐式等待
显示等待、隐式等待和强制等待的区别
python3+selenium3自动化测试—元素等待-等待显示
selenium3+python3自动化测试仿键盘操作(全选、复制、剪贴、粘贴)
selenium3+python3自动化测试鼠标操作(双击、右键、悬停)
python3+selenium3在百度首页中定位登录按钮并登陆
在数据库中根据某个值递增更新(update)某个字段
phpcms中content主要使用的详情列表关系
原文地址:https://www.cnblogs.com/chengulv/p/355091.html
最新文章
ES6学习笔记(二)--let和const
ES6学习笔记(一)--Set和Map
mpvue打包小程序注意点
webpack4.x初使用
mongose + express 写REST API
mongodb基础环境搭建
phpstudy集成下Apache配置部署https安全证书
windows安装mysql数据库
eclipse搭建hibernate环境
struts2、ajax实现前后端交互
热门文章
dubbo-admin 生成最新版的包
js 调用 angularJs 的方法
Dubbo升级篇
dubbo的路由规则
dubbo的令牌验证
tomcat 8启动很慢解决方式
云服务器 ECS CentOS 7 重启 sshd 服务
js 删除数组中多个元素
linux 修改普通用户的 max user process
spring 事务使用AOP代理后的调用流程
Copyright © 2011-2022 走看看