会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Scott 的工地
一只搬砖程序员
博客园
首页
新随笔
联系
订阅
管理
新闻图片效果
<
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
=
"
width: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
-->
posted @
2007-12-03 10:31
ScottX
阅读(
430
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告