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
-->
查看全文
相关阅读:
MVC HtmlHelper用法大全
mysql查询结果输出到文件
未能加载文件或程序集“Autofac, Version=3.4.0.0,
IHttpModule接口
演练:创建和注册自定义 HTTP 模块
Tablespace for table '`pomelo`.`bag`' exists. Please DISCARD the tablespace before IMPORT.
java开发知识IO知识之输入输出流以及文件
Java开发知识之Java中的Map结构
Java开发知识之Java中的集合Set接口以及子类应用
Java开发知识之Java中的集合上List接口以及子类讲解.
原文地址:https://www.cnblogs.com/voidxy/p/980679.html
最新文章
java 包之 BeanUtils包的使用
jsp基础之 jstl
PHP基础之 file_get_contents() 函数
php基础之 ->, =>,@,&,::,%符号
PHP基础之 define() 函数
thinkPHP入门 一
jquery mobile 入门级实战1
jquery mobile 入门
【转】作为一名基层管理者如何利用情商管理自己和团队(二)
【转】作为一名基层管理者如何利用情商管理自己和团队(一)
热门文章
Nginx之虚拟目录-root与alias的区别
mac安装IDEA
移动H5功能设计反思 测试用例总结
【转】七年阿里老人谈新人成长
一种简单的数据库性能测试方法
集中精力的重要性(The Importance of Focus)
从此sudo不再输密码
预定义的类型“Microsoft.CSharp.RuntimeBinder.Binder”未定义或未导入
DevExpress v15.2新功能介绍视频(25集全)
HTML中label的两种使用方法
Copyright © 2011-2022 走看看