| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 376 人关注过本帖
标题:大家帮我看看下面的代码怎么回事?
只看楼主 加入收藏
zjqm
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2005-12-21
收藏
 问题点数:0 回复次数:0 
大家帮我看看下面的代码怎么回事?

下面这段代码是一个图片轮换的代码,正常的效果可以点击查看,页面中间图片轮换效果部分。

现在的问题是,如果我把代码中的FileList或者TxtList 用变量来取得值,比如

<%

dim str1,str2

str1="adv/1.jpg,adv/2.jpg,adv/3.jpg,adv/4.jpg,adv/5.jpg,adv/6.jpg,adv/7.jpg"

str2=="<a href=http://www.665544.com target=_blank><font color=990099>米兰整形美容外科医院1</font></a>,<a href=http://www.665544.com target=_blank><b>米兰整形美容外科医院2</b></a>,<a href=http://www.665544.com target=_blank><font color=blue>米兰整形美容外科医院3</font></a>,<a href=http://www.665544.com target=_blank>米兰整形美容外科医院4</a>,<a href=http://www.665544.com/2005/10-24/22-11-4671784.html target=_blank><font color=blue>米兰整形美容外科医院5</font></a>,<a href=http://www.665544.com/2005/10-24/22-04-2863439.html target=_blank>米兰整形美容外科医院6</a>,<a href=http://www.665544.com target=_blank><font color=blue>米兰整形美容外科医院7</font></a>"
%>

<SCRIPT language=VBScript>
Dim FileList,FileListArr,TxtList,TxtListArr
FileList =str1 或者FileList =<%=str1%>
TxtList =str2 或者TxtList =<%=str2%>

........

效果就消失了,图片无法显示。

请问大家这个代码是怎么回事,下面的是完整的初始代码:

<SCRIPT language=VBScript>
Dim FileList,FileListArr,TxtList,TxtListArr
FileList ="adv/1.jpg,adv/2.jpg,adv/3.jpg,adv/4.jpg,adv/5.jpg,adv/6.jpg,adv/7.jpg"
TxtList ="<a href=http://www.665544.com target=_blank><font color=990099>米兰整形美容外科医院1</font></a>,<a href=http://www.665544.com target=_blank><b>米兰整形美容外科医院2</b></a>,<a href=http://www.665544.com target=_blank><font color=blue>米兰整形美容外科医院3</font></a>,<a href=http://www.665544.com target=_blank>米兰整形美容外科医院4</a>,<a href=http://www.665544.com/2005/10-24/22-11-4671784.html target=_blank><font color=blue>米兰整形美容外科医院5</font></a>,<a href=http://www.665544.com/2005/10-24/22-04-2863439.html target=_blank>米兰整形美容外科医院6</a>,<a href=http://www.665544.com target=_blank><font color=blue>米兰整形美容外科医院7</font></a>"
FileListArr = Split(FileList,",")
TxtListArr = Split(TxtList,",")
Dim CanPlay
CanPlay = CInt(Split(Split(navigator.appVersion,";")(1)," ")(2))>5
Dim FilterStr
FilterStr = "RevealTrans(duration=2,transition=23)"
FilterStr = FilterStr + ";BlendTrans(duration=2)"
If CanPlay Then
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.Pixelate(,enabled=false,duration=2,maxSquare=25)"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.Fade(duration=2,overlap=0)"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.GradientWipe(duration=2,gradientSize=0.25,motion=forward )"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.Stretch(duration=2,stretchStyle=PUSH)"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.Wheel(duration=2,spokes=16)"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.RandomDissolve(duration=2)"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.Spiral(duration=2,gridSizeX=50,gridSizeY=50)"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.Slide(duration=2,bands=1,slideStyle=SWAP)"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.RadialWipe(duration=2,wipeStyle=CLOCK)"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=15,Duration=1)"
FilterStr = FilterStr + ";progid:DXImageTransform.Microsoft.Wipe(duration=3,gradientsize=0.25,motion=reverse)"
Else
Msgbox "米兰整形美容外科医院!",64
End If
Dim FilterArr
FilterArr = Split(FilterStr,";")
Dim PlayImg_M
PlayImg_M = 5 * 1000 '切换时间(毫秒)
Dim I
I = 1

Sub ChangeImg
Do While FileListArr(I)=""
I = I + 1
If I>UBound(FileListArr) Then I = 0
Loop
Dim J
If I>UBound(FileListArr) Then I = 0
Randomize
J = Int(Rnd * (UBound(FilterArr)+1))
Img.style.filter = FilterArr(J)
Img.filters(0).Apply
Img.Src = FileListArr(I)
Img.filters(0).play
Txt.filters(0).Apply
Txt.innerHTML = TxtListArr(I)
Txt.filters(0).play()
I = I + 1
If I>UBound(FileListArr) Then I = 0
TempImg.Src = FileListArr(I)
SetTimeout "ChangeImg", PlayImg_M,"VBScript"
End Sub
</SCRIPT>

搜索更多相关主题的帖子: 代码 
2005-12-21 14:11
快速回复:大家帮我看看下面的代码怎么回事?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.040778 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved