标题:JavaScript 代码问题,谁帮改一下
只看楼主
tanga
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2006-3-6
 问题点数:0 回复次数:1 
JavaScript 代码问题,谁帮改一下

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body bgcolor=#000000>
<link href="css.css" rel="stylesheet" type="text/css">
<table height="500" border="0" align="center">
<tr>
<td valign="middle"><table width="550" height="419" border="0" align="center">
<tr>
<td width="550" height="419" background="IMG/bg01.jpg" align=center>
<marquee scrollamount='2' scrolldelay='30' direction= 'UP' width='250' id='binbin' height='150' onmouseover='binbin.stop()' onmouseout='binbin.start()' Author:redriver; For more,visit:www.52xyxy.com>
<p><font color='#C8F5FF'>
<p>天上挂着很多很多闪烁的星星
<p>在远空向我们眨着迷人的眼睛
<p>今夜 是难逢的流星雨之夜
<p>┈┈┈┈┈┈┈┈┈┈┈┈
<p>也许是星星渴望人间的幸福
<p>也许是星星羡慕人间的真情
<p>她慢慢的张开了洁白丰腴的翅膀
<p>在深蓝色的星空中划下了一道瞬间的优美的弧
<p>飞向了凡间......
<p>┈┈┈┈┈┈┈┈┈┈┈┈
<p>见到流星许的愿是很灵很灵的
<p>默默的合起你的双手
<p>虔诚地仰起头
<p>对着星星闭上眼睛
<p>嘴里默念此刻只有你知道的语言
<p>┈┈┈┈┈┈┈┈┈┈┈┈
<p>天使向着你轻盈的飞来......
<p>点击一颗流星许下你的愿望吧......
</font>
</marquee> <script language="JavaScript1.2">

grphcs=new Array(6)
Image0=new Image();
Image0.src=grphcs[0]="img/leaves1.gif";
Image1=new Image();
Image1.src=grphcs[1]="img/leaves2.gif"
Image2=new Image();
Image2.src=grphcs[2]="img/leaves3.gif"
Image3=new Image();
Image3.src=grphcs[3]="img/leaves4.gif"
Image4=new Image();
Image4.src=grphcs[4]="img/leaves5.gif"
Image5=new Image();
Image5.src=grphcs[5]="img/leaves6.gif"
Amount=8;
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<a href=write.asp><img border="0" id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px"></a>');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*10+3;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i];
sx = Speed[i];
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*10+3;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',25);
}

window.onload=fall
</script></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
如何把下面的地址修改为完整的连接地址,代码应该怎么改?
mage0.src=grphcs[0]="img/leaves1.gif";
Image1=new Image();
Image1.src=grphcs[1]="img/leaves2.gif"
Image2=new Image();
Image2.src=grphcs[2]="img/leaves3.gif"
Image3=new Image();
Image3.src=grphcs[3]="img/leaves4.gif"
Image4=new Image();
Image4.src=grphcs[4]="img/leaves5.gif"
Image5=new Image();
Image5.src=grphcs[5]="img/leaves6.gif"

搜索更多相关主题的帖子: html content blank PUBLIC border 
2006-05-04 12:13
dreame
Rank: 3Rank: 3
等 级:新手上路
威 望:8
帖 子:521
专家分:0
注 册:2005-10-23
得分:0 
Image1.src=grphcs[1]="img/leaves2.gif"
改为Image1.src=grphcs[1]="根目录/img/leaves2.gif"
或者为Image1.src=grphcs[1]="http://........"



有时候真的想放弃寂寞的等待,但她是那么的可爱!I love u forever!
2006-05-04 17:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-61816-1-1.html




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

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