| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 688 人关注过本帖
标题:asp环境下图片连续向左移动显示问题,紧急!
只看楼主 加入收藏
mao_x_r
Rank: 1
等 级:新手上路
帖 子:81
专家分:0
注 册:2006-6-6
收藏
 问题点数:0 回复次数:0 
asp环境下图片连续向左移动显示问题,紧急!

本人下载了图片连续向左移动程序,出现了问题,紧急!

------------------------程序代码如下-------------------------------------------------------------------------

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%" height="153">
<tr>
<td width="40%" height="135"></td>
<td width="60%" height="135">

//以下是许多图片连续向左移动的Java代码,代码本身绝对没错
<script language="JavaScript1.2">
//Specify the slider's width (in pixels)
var sliderwidth=530
//Specify the slider's height
var sliderheight=160
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=3
//configure background color:
slidebgcolor="#EAEAEA"

//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''


leftrightslide[0]='<a href="1.htm"><img src="images/Pa280014.jpg" border=1></a>'
leftrightslide[1]='<a href="13.htm"><img src="images/Pa280018.jpg" border=1></a>'
leftrightslide[2]='<a href="11.htm"><img src="images/Pa280019.jpg" border=1></a>'
leftrightslide[3]='<a href="4.htm"><img src="images/Pa280013.jpg" border=1></a>'
leftrightslide[4]='<a href="10.htm"><img src="images/Pa280023.jpg" border=1></a>'
leftrightslide[5]='<a href="6.htm"><img src="images/Pa280002.jpg" border=1></a>'
leftrightslide[6]='<a href="5.htm"><img src="images/Pa280003.jpg" border=1></a>'
leftrightslide[7]='<a href="3.htm"><img src="images/Pa280004.jpg" border=1></a>'
leftrightslide[8]='<a href="2.htm"><img src="images/Pa280005.jpg" border=1></a>'
leftrightslide[9]='<a href="7.htm"><img src="images/Pa280006.jpg" border=1></a>'
leftrightslide[10]='<a href="9.htm"><img src="images/Pa280008.jpg" border=1></a>'
leftrightslide[11]='<a href="12.htm"><img src="images/Pa280009.jpg" border=1></a>'


////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=slidespeed
leftrightslide='<nobr>'+leftrightslide.join(" ")+'</nobr>'
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-3000">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide

function fillup(){
if (iedom){
cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
cross_slide2.style.left=actualwidth+20
}
else if (document.layers){
ns_slide=document.ns_slidemenu.document.ns_slidemenu2
ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
ns_slide.document.write(leftrightslide)
ns_slide.document.close()
actualwidth=ns_slide.document.width
ns_slide2.left=actualwidth+20
ns_slide2.document.write(leftrightslide)
ns_slide2.document.close()
}
lefttime=setInterval("slideleft()",30)
}
window.onload=fillup

function slideleft(){
if (iedom){
if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed
else
cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+30

if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed
else
cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+30

}
else if (document.layers){
if (ns_slide.left>(actualwidth*(-1)+8))
ns_slide.left-=copyspeed
else
ns_slide.left=ns_slide2.left+actualwidth+30

if (ns_slide2.left>(actualwidth*(-1)+8))
ns_slide2.left-=copyspeed
else
ns_slide2.left=ns_slide.left+actualwidth+30
}
}


if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
write('<div id="test2" style="position:absolute;left:0;top:0"></div>')
write('<div id="test3" style="position:absolute;left:-1000;top:0"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script></td>
</tr>
<tr>
<td width="40%" height="18"></td>
<td width="60%" height="18"></td>
</tr>
</table>

</body>

</html>

---------------------------------------------------------------------------------------------------------------
在服务器运行这一段程序,出现了这样一个问题:本来只要在网页右半边显示的图片,结果连续移动的图片从网页的右边界一直移动到左边界,包括网页左半边应显示文本的区域也被图片遮住了,这时图片浮动在网页左边文本的上方。但如果把这段程序的最开始的两句删掉,就是把这两句删掉:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >

再在服务器上运行就没有这个问题。但是编辑asp动态网页时,这两句程序必须要放在开始位置,这样有矛盾,请问各位高人如何解决这一问题。

[此贴子已经被作者于2006-8-8 0:16:12编辑过]



pxTO9rgj.txt (5.54 KB) asp环境下图片连续向左移动显示问题,紧急!

搜索更多相关主题的帖子: 环境 asp 
2006-08-01 16:22
快速回复:asp环境下图片连续向左移动显示问题,紧急!
数据加载中...
 
   



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

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