<html>
<head>
<title>Scroll Images</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="Layer1" style="position:absolute; left:0px; top:0px; width:313px; height:438px; clip:rect(0 313 438 0); z-index:1; border: 0px none #000000">
<div id="Layer2" style="position:absolute; left:0px; top:0px; width:313px; height:438px; z-index:1; border: 0px none #000000;visibility:visible;">
<table cellpadding="0" cellspacing="0" align="center" border="0" bgcolor="#d4be92">
<tr>
<td align="center" height="146">
<img src="images/index_frame_1.gif">
</td>
</tr>
<tr>
<td align="center" height="146">
<img src="images/index_frame_2.gif">
</td>
</tr>
<tr>
<td align="center" height="146">
<img src="images/index_frame_3.jpg">
</td>
</tr>
</table>
</div>
<div id="Layer3" style="position:absolute; left:0px; top:438px; width:313px; height:438px; z-index:1; border: 0px none #000000;visibility:visible;">
<table cellpadding="0" cellspacing="0" align="center" border="0" bgcolor="#d4be92">
<tr>
<td align="center" height="146">
<img src="images/index_frame_4.jpg">
</td>
</tr>
<tr>
<td align="center" height="146">
<img src="images/index_frame_5.jpg">
</td>
</tr>
<tr>
<td align="center" height="146">
<img src="images/index_frame_6.jpg">
</td>
</tr>
</table>
</div>
</div>
<script language="vbscript">
<!--
dim layer_top(2) '图层的上边距
layer_top(1)=0
layer_top(2)=438
settimeout "scroll_layer",2000 '延时2秒后滚动图层sub scroll_layer() '滚动图层
layer2.style.top=layer_top(1)-1 '每次向上滚动1个象素
layer_top(1)=layer_top(1)-1
layer3.style.top=layer_top(2)-1
layer_top(2)=layer_top(2)-1
if layer_top(2)<>0 and layer_top(1)<>0 then
settimeout "scroll_layer",5 '每5毫秒滚动一次
else
change_disp '改变图层的显示方式
end if
end subsub change_disp() '改变图层的显示方式
dim top_value_tmp '临时存储图层TOP值
dim value_top_2,value_top_3 'layer2,layer3的最终top数值
top_value_tmp=layer2.style.top
value_top_2=split_layer_top(top_value_tmp) '解析top值
top_value_tmp=layer3.style.top
value_top_3=split_layer_top(top_value_tmp) '解析top值
if value_top_3<value_top_2 then
move_layer3 '移动图层3
else
move_layer2 '移动图层2
end if
settimeout "scroll_layer",2000 '延时2秒后滚动图层
end subsub move_layer2() '移动图层2
layer2.style.visibility="hidden"
layer2.style.top="438px"
layer_top(1)=438
layer2.style.visibility="visible"
end subsub move_layer3() '移动图层3
layer3.style.visibility="hidden"
layer3.style.top="438px"
layer_top(2)=438
layer3.style.visibility="visible"
end subfunction split_layer_top(top_value) '解析层的top值取得它的相应数值
dim tmp_value
tmp_value=left(top_value,len(top_value)-2)
split_layer_top=cint(tmp_value)
end function
-->
</script>
</body>
</html>
<head>
<title>Scroll Images</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="Layer1" style="position:absolute; left:0px; top:0px; width:313px; height:438px; clip:rect(0 313 438 0); z-index:1; border: 0px none #000000">
<div id="Layer2" style="position:absolute; left:0px; top:0px; width:313px; height:438px; z-index:1; border: 0px none #000000;visibility:visible;">
<table cellpadding="0" cellspacing="0" align="center" border="0" bgcolor="#d4be92">
<tr>
<td align="center" height="146">
<img src="images/index_frame_1.gif">
</td>
</tr>
<tr>
<td align="center" height="146">
<img src="images/index_frame_2.gif">
</td>
</tr>
<tr>
<td align="center" height="146">
<img src="images/index_frame_3.jpg">
</td>
</tr>
</table>
</div>
<div id="Layer3" style="position:absolute; left:0px; top:438px; width:313px; height:438px; z-index:1; border: 0px none #000000;visibility:visible;">
<table cellpadding="0" cellspacing="0" align="center" border="0" bgcolor="#d4be92">
<tr>
<td align="center" height="146">
<img src="images/index_frame_4.jpg">
</td>
</tr>
<tr>
<td align="center" height="146">
<img src="images/index_frame_5.jpg">
</td>
</tr>
<tr>
<td align="center" height="146">
<img src="images/index_frame_6.jpg">
</td>
</tr>
</table>
</div>
</div>
<script language="vbscript">
<!--
dim layer_top(2) '图层的上边距
layer_top(1)=0
layer_top(2)=438
settimeout "scroll_layer",2000 '延时2秒后滚动图层sub scroll_layer() '滚动图层
layer2.style.top=layer_top(1)-1 '每次向上滚动1个象素
layer_top(1)=layer_top(1)-1
layer3.style.top=layer_top(2)-1
layer_top(2)=layer_top(2)-1
if layer_top(2)<>0 and layer_top(1)<>0 then
settimeout "scroll_layer",5 '每5毫秒滚动一次
else
change_disp '改变图层的显示方式
end if
end subsub change_disp() '改变图层的显示方式
dim top_value_tmp '临时存储图层TOP值
dim value_top_2,value_top_3 'layer2,layer3的最终top数值
top_value_tmp=layer2.style.top
value_top_2=split_layer_top(top_value_tmp) '解析top值
top_value_tmp=layer3.style.top
value_top_3=split_layer_top(top_value_tmp) '解析top值
if value_top_3<value_top_2 then
move_layer3 '移动图层3
else
move_layer2 '移动图层2
end if
settimeout "scroll_layer",2000 '延时2秒后滚动图层
end subsub move_layer2() '移动图层2
layer2.style.visibility="hidden"
layer2.style.top="438px"
layer_top(1)=438
layer2.style.visibility="visible"
end subsub move_layer3() '移动图层3
layer3.style.visibility="hidden"
layer3.style.top="438px"
layer_top(2)=438
layer3.style.visibility="visible"
end subfunction split_layer_top(top_value) '解析层的top值取得它的相应数值
dim tmp_value
tmp_value=left(top_value,len(top_value)-2)
split_layer_top=cint(tmp_value)
end function
-->
</script>
</body>
</html>
解决方案 »
- ext.getcmp问题
- blockUI如何设置拖动啊?
- js高手帮个忙,提交后input表单值只能得到一个,丢失了另一个,怎么改正都得到?
- extjs Ext.getCmp().setvalue();的问题
- JS任务栏滚动效果问题
- 终于找到了“搜索引擎源代码”啦!高兴散分!哈哈哈哈!(可惜偶看不懂!) 都是老外地========>有兴趣的来up
- 希望哪位高手能够告诉我height:'+height+'这个语句表示什么意思?
- 这种加密是哪种加密 是不是<SCRIPT language=JScript.Encode>
- getElementById取不到控件,求助!
- 求大神指点些焦点图问题?
- 客户端验证问题,请帮忙
- 执行JS函数后滚动条位置问题,这个问题折腾很久了,大家帮帮忙?
我是这样学的,不错呀.