搞不明白的浮动广告网页上传后不显示的问题,急!

dongfly 2004-10-27 11:02:55
我有个网页ad1.asp,想做一个在网页上漂浮的图片层,在本地机上测试可以实现,但上传到网站服务器后就不能执行成功了(图片总是显示不出来,不是路径问题),奇怪的是本地网页ad1.asp在上传后也不能正常显示了,请高手帮忙!
代码如下:
<HTML>
<BODY text=#000000 bgColor=#003399 leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<div id="img" style="position:absolute;">
<a href="http://www.126.com/" target="_blank"><img src="logo1.gif" onmouseover="stopit()" onmouseout="startit()" width="90" height="50" border="0"></a>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.style.top = yPos + document.body.scrollTop;
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
}
}
function start() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
start();

function startit() {
//img.visibility = "visible";
interval = setInterval('changePos()', delay);
}

function stopit() {
clearInterval(interval);
}
startit();
// End -->
</script>

</BODY>
</HTML>

...全文
174 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
dongfly 2004-10-27
  • 打赏
  • 举报
回复
运行都能运行,但就是不显示图片,什么错都不报。
图片路径都换N个地方了,我就放在根目录下用也不行(上面的代码就是),难道还要加上“网址”吗?
快来人啊,多谢了!
wellcomer 2004-10-27
  • 打赏
  • 举报
回复
应该就是图片路径的错误吧。
心云意水 2004-10-27
  • 打赏
  • 举报
回复
不能运行?报什么错?
sunnybay 2004-10-27
  • 打赏
  • 举报
回复
你的图片路径是什么,最好给个网址了

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧