zoukankan
html css js c++ java
新闻图片效果
<
SCRIPT language
=
JavaScript
>
var
imgUrl
=
new
Array();
var
imgLink
=
new
Array();
var
imgText
=
new
Array();
var
picNum
=
0
;
imgUrl[
1
]
=
"
images/aa01.jpg
"
;
//
如果想在要图片上显示可以点击链接,把下注示去掉即可
//
imgLink[1]="http://www.foundertech.com";
imgUrl[
2
]
=
"
images/aa07.jpg
"
;
//
imgLink[2]="http://www.foundertech.com";
imgUrl[
3
]
=
"
images/aa11.jpg
"
;
//
imgLink[3]="http://www.founder.com/qywh.htm";
imgUrl[
4
]
=
"
images/aa14.jpg
"
;
//
imgLink[4]="http://card.foundertech.com/live/shucu/index.htm";
imgUrl[
5
]
=
"
images/aa15.jpg
"
;
//
imgLink[5]="http://www.foundertech.com/sales_pro/0706bijiben/index.html";
function
NextPic()
{
if
(picNum
<
5
) picNum
++
;
else
picNum
=
1
;
if
(document.all)
{
document.imgInit.filters.revealTrans.Transition
=
Math.floor(Math.random()
*
23
);
document.imgInit.filters.revealTrans.apply(); document.imgInit.filters.revealTrans.play();
}
document.images.imgInit.src
=
imgUrl[picNum];
//
document.all.hlkImg.href="javascript:goUrl();";
focustext.innerHTML
=
'
<
a href
=/
'
+
imgLink[picNum]
+
' target
=
_blank
>
'
+
imgText[picNum]
+
'
</
a
>
';
theTimer
=
setTimeout('NextPic()',
3000
); }
function
goUrl()
{ window.open(imgLink[picNum],'_blank');
}
</
SCRIPT
>
<
TABLE
>
<
TBODY
>
<
TR
>
<
TD align
=
"
right
"
><
A id
=
hlkImg
name
=
hlkImg
><
IMG id
=
imgInit
style
=
"
FILTER: revealTrans(duration=2,Transition=5)
"
width
=
"
195px
"
height
=
"
255px
"
border
=
0
name
=
imgInit
></
A
></
TD
></
TR
>
<
TR style
=
"
DISPLAY: none
"
>
<
TD align
=
middle height
=
"
10px
"
>
<
DIV id
=
focustext align
=
center name
=
"
focustext
"
style
=
"
14px;height:10px
"
></
DIV
>
<
SCRIPT language
=
JavaScript
>
NextPic();
</
SCRIPT
>
</
TD
></
TR
></
TBODY
></
TABLE
>
<!--
动态显示图片方法一end
-->
<!--
动态显示图片方法二开始
-->
<
SCRIPT language
=
javascript type
=
""
>
//
Set slideShowSpeed (milliseconds)
var
slideShowSpeed
=
5000
;
//
Duration of crossfade (seconds)
var
crossFadeDuration
=
3
;
//
Specify the image files
var
Pic
=
new
Array();
//
to add more images, just continue
//
the pattern, adding to the array below
Pic[
0
]
=
'images
/
aa11.jpg'
Pic[
1
]
=
'images
/
aa07.jpg'
Pic[
2
]
=
'images
/
aa14.jpg'
Pic[
3
]
=
'images
/
aa15.jpg'
Pic[
4
]
=
'images
/
aa01.jpg'
//
do not edit anything below this line
var
t;
var
j
=
0
;
var
p
=
Pic.length;
var
preLoad
=
new
Array();
for
(i
=
0
; i
<
p; i
++
)
{
preLoad[i]
=
new
Image();
preLoad[i].src
=
Pic[i];
}
function
runSlideShow()
{
if
(document.all)
{
document.images.SlideShow.style.filter
=
"
blendTrans(duration=2)
"
;
document.images.SlideShow.style.filter
=
"
blendTrans(duration=crossFadeDuration)
"
;
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src
=
preLoad[j].src;
if
(document.all)
{
document.images.SlideShow.filters.blendTrans.Play();
}
j
=
j
+
1
;
if
(j
>
(p
-
1
)) j
=
0
;
t
=
setTimeout('runSlideShow()', slideShowSpeed);
}
</
SCRIPT
>
<
img src
=
"
javascript:runSlideShow()
"
name
=
'SlideShow' width
=
"
195px
"
height
=
"
255
"
border
=
"
0
"
align
=
"
right
"
>
<!--
动态显示图片方法一END
-->
查看全文
相关阅读:
2014年寒假学习规划
二十进制数的加法--【英雄会】
使用IBM SVC构建vSphere存储间集群
游戏服务器学习笔记 2———— 准备工作
php判断正常访问和外部访问
游戏服务器学习笔记 3———— firefly 的代码结构,逻辑
数学基础知识 ——(1)高等数学
动态内存与智能指针
Numpy(4)—— 保存和导入文件
Numpy(3)—— 线性代数相关函数
原文地址:https://www.cnblogs.com/voidxy/p/980679.html
最新文章
SpringBoot 2.0 + Nacos + Sentinel 流控规则集中存储
SpringBoot 2.0 + 阿里巴巴 Sentinel 动态限流实战
SpringBoot 2.0 + Apache Dubbo 2.7.3 最新版整合方案
从SpringBoot构建十万博文聊聊Tomcat集群监控
从SpringBoot构建十万博文聊聊限流特技
集群、限流、缓存 BAT 大厂无非也就是这么做
从SpringBoot构建十万博文聊聊高并发文章浏览量设计
从SpringBoot构建十万博文聊聊缓存穿透
JAVA字符串怎么转换成整数
linux 重定向 标准错误与标准输出到同一文件
热门文章
树的先序、中序和后序遍历方式
二叉树查找
二分查找方法
快速排序
有了进程为什么还要线程?
sed——linux下对文本当控制操作(替换,追加)
支持AIRPLAY ,DLNA,MIRACAST的HDMI DONGLE
老徐FrankXuLei 受邀为花旗银行讲授《微软WCF服务分布式开发与SOA架构设计课程》
大智慧F10离线资料压缩包带F10关键字过滤软件--更新于2014-01-06.rar 184MB
PHP之Composer类库依赖管理神器
Copyright © 2011-2022 走看看