我是个初学者,有两个问题想请教!谢谢!
我是用Microsoft FrontPage2000来制作网页的,为什么我将几种不同效果的代码插入同一页,经常会出现只产生一种效果,而不能几种效果同时产生的呢?是不是我插入代码的位置不对呢?还是代码互相有冲突呢?那我该将代码插入哪个位置呢?
例如以下这两种效果:
第一种效果代码:
<html>
<head>
<title>0、1数字下落</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor=#000000>
<!-------------------------------->
<script language="JavaScript">
<!--
if (document.all){
Cols=6;
Cl=24;//Spaces are included so real length is 48!
Cs=10;
Ts=10;
Tc=#008800;
Tc1=#00ff00;
MnS=20;
MxS=30;
I=Cs;
Sp=new Array();S=new Array();Y=new Array();
C=new Array();M=new Array();B=new Array();
RC=new Array();E=new Array();Tcc=new Array(0,1);
document.write("<div id=Container style=position:absolute;top:0;left:-"+Cs+">");
document.write("<div style=position:relative>");
for(i=0; i < Cols; i++){
S[i]=I+=Cs;
document.write("<div id=A style=position:absolute;top:0;font-family:Arial;font-size:"
+Ts+"px;left:"+S[i]+";width:"+Ts+"px;height:0px;color:"+Tc+";visibility:hidden></div>");
}
document.write("</div></div>");
for(j=0; j < Cols; j++){
RC[j]=1+Math.round(Math.random()*Cl);
Y[j]=0;
Sp[j]=Math.round(MnS+Math.random()*MxS);
for(i=0; i < RC[j]; i++){
B[i]=;
C[i]=Math.round(Math.random()*1)+ ;
M[j]=B[0]+=C[i];
}
}
function Cycle(){
Container.style.top=window.document.body.scroll;
for (i=0; i < Cols; i++){
var r = Math.floor(Math.random()*Tcc.length);
E[i] = <font color=+Tc1+>+Tcc[r]+</font>;
Y[i]+=Sp[i];
if (Y[i] > window.document.body.clientHeight){
for(i2=0; i2 < Cols; i2++){
RC[i2]=1+Math.round(Math.random()*Cl);
for(i3=0; i3 < RC[i2]; i3++){
B[i3]=;
C[i3]=Math.round(Math.random()*1)+ ;
C[Math.floor(Math.random()*i2)]= + ;
M[i]=B[0]+=C[i3];
Y[i]=-Ts*M[i].length/1.5;
A[i].style.visibility=visible;
}
Sp[i]=Math.round(MnS+Math.random()*MxS);
}
}
A[i].style.top=Y[i];
A[i].innerHTML=M[i]+ +E[i]+ ;
}
setTimeout(Cycle(),20)
}
Cycle();
}
// -->
</script>
<!---------------------------------->
</body>
</html>
第二种代码效果:
<html>
<script language="JavaScript">
<!-- Logo Orbit II kurt.grigg@virgin.net
yourLogo=欢迎来到硕仔的天空!;
logoFont=Arial;
logoSize=9;
logoColor=blue;
logoWidth=40;
logoHeight=40;
logoSpeed=0.03;
//Nothing needs altering below!
yourLogo=yourLogo.split();
L=yourLogo.length;
Result="<font face="+logoFont+" style=font-size:"+logoSize+"pt color="+logoColor+">";
TrigSplit=360/L;
br=(document.layers)?1:0;
if (br){
for (i=0; i < L; i++)
document.write(<layer name="ns+i+" top=0 left=0 width=14 height=14">+Result+yourLogo[i]+</font></layer>);
}
else{
document.write(<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">);
for (i=0; i < L; i++)
document.write(<div id="ie" style="position:absolute;top:0px;left:0px;width:14px;height:14px">+Result+yourLogo[i]+</font></div>);
document.write(</div></div>);
}
ypos=0;
xpos=0;
step=logoSpeed;
currStep=0;
Y=new Array();
X=new Array();
Yn=new Array();
Xn=new Array();
for (i=0; i < L; i++)
{
Yn[i]=0;
Xn[i]=0;
}
(document.layers)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ypos = (document.layers)?evnt.pageY:event.y;
xpos = (document.layers)?evnt.pageX:event.x;
}
(document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function animateLogo(){
if (!br)outer.style.pixel=document.body.scroll;
for (i=0; i < L; i++){
var layer=(document.layers)?document.layers[ns+i]:ie[i].style;
layer.top =Y[i]+logoHeight*Math.sin(currStep+i*TrigSplit*Math.PI/180);
layer.left=X[i]+logoWidth*Math.cos(currStep+i*TrigSplit*Math.PI/180);
}
currStep-=step;
}
function Delay(){
for (i=L; i >= 0; i--)
{
Y[i]=Yn[i]+=(ypos-Yn[i])*(0.1+i/L);
X[i]=Xn[i]+=(xpos-Xn[i])*(0.1+i/L);
}
animateLogo();
setTimeout(Delay(),20);
}
window.onload=Delay;
// -->
</script>
<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">
<style>
<!--
body, td, div { font-family: Verdana; font-size: 9pt }
-->
</style>
<title></title>
</head>
<body>
</body>
</html>
还有个问题就是用Microsoft FrontPage2000制作网页好还是用Dreamweaver好呢?哪里有Dreamweaver这个软件下载呢??
谢谢!谢谢!请高抬贵手!
<html>
<head>
<title>0、1数字下落</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="great">
<!-------------------------------->
<script language="JavaScript">
<!--
if (document.all){
Cols=6;
Cl=24;//Spaces are included so real length is 48!
Cs=10;
Ts=10;
Tc=#008800;
Tc1=#00ff00;
MnS=20;
MxS=30;
I=Cs;
Sp=new Array();S=new Array();Y=new Array();
C=new Array();M=new Array();B=new Array();
RC=new Array();E=new Array();Tcc=new Array(0,1);
document.write("<div id=Container style=position:absolute;top:0;left:-"+Cs+">");
document.write("<div style=position:relative>");
for(i=0; i < Cols; i++){
S[i]=I+=Cs;
document.write("<div id=A style=position:absolute;top:0;font-family:Arial;font-size:"
+Ts+"px;left:"+S[i]+";width:"+Ts+"px;height:0px;color:"+Tc+";visibility:hidden></div>");
}
document.write("</div></div>");
for(j=0; j < Cols; j++){
RC[j]=1+Math.round(Math.random()*Cl);
Y[j]=0;
Sp[j]=Math.round(MnS+Math.random()*MxS);
for(i=0; i < RC[j]; i++){
B[i]=;
C[i]=Math.round(Math.random()*1)+ ;
M[j]=B[0]+=C[i];
}
}
function Cycle(){
Container.style.top=window.document.body.scroll;
for (i=0; i < Cols; i++){
var r = Math.floor(Math.random()*Tcc.length);
E[i] = <font color=+Tc1+>+Tcc[r]+</font>;
Y[i]+=Sp[i];
if (Y[i] > window.document.body.clientHeight){
for(i2=0; i2 < Cols; i2++){
RC[i2]=1+Math.round(Math.random()*Cl);
for(i3=0; i3 < RC[i2]; i3++){
B[i3]=;
C[i3]=Math.round(Math.random()*1)+ ;
C[Math.floor(Math.random()*i2)]= + ;
M[i]=B[0]+=C[i3];
Y[i]=-Ts*M[i].length/1.5;
A[i].style.visibility=visible;
}
Sp[i]=Math.round(MnS+Math.random()*MxS);
}
}
A[i].style.top=Y[i];
A[i].innerHTML=M[i]+ +E[i]+ ;
}
setTimeout(Cycle(),20)
}
Cycle();
}
// -->
</script>
<!---------------------------------->
<script language="JavaScript">
<!--
var mouse=new Object()
mouse.msg="怀念张国荣" //将这里改成你的文字
mouse.x=0
mouse.y=0
mouse.speed=Math.PI/180 // 1 degree
mouse.radius=50
mouse.ms=new Array()
if(document.layers){
document.captureEvents(Event.MOUSEMOVE)
for(i=0;i<=mouse.msg.length;i++)document.write("<layer name=mousetext"+i+">"+mouse.msg.charAt(i)+"</layer>")
}else
for(i=0;i<=mouse.msg.length;i++)document.write("<span id=mousetext"+i+" class=tacoscript>"+mouse.msg.charAt(i)+"</span>")
for(i=0;i<=mouse.msg.length;i++){
mouse.ms[i]=document.getElementById?document.getElementById("mousetext"+i).style:document.all?document.all["mousetext"+i].style:document.layers["mousetext"+i]
mouse.ms[i].deg=Math.PI*2/mouse.msg.length*i}
document.onmousemove=function m(e){
if(!e)e=event
mouse.x=document.all?document.body.scrollLeft+e.clientX:e.pageX
mouse.y=document.all?document.body.scroll+e.clientY:e.pageY
run()}
function run(){
for(i=mouse.ms.length-1;i>=0;i--){
mouse.ms[i].deg+=mouse.speed
mouse.ms[i].left=mouse.x-Math.sin(mouse.ms[i].deg)*mouse.radius
mouse.ms[i].top=mouse.y+Math.cos(mouse.ms[i].deg)*mouse.radius}}
setInterval(run,10)//旋转速度
//-->
</script>
<style type="text/css">
<!--
.tacoscript {font-size:10pt;POSITION: absolute;VISIBILITY: visible}
-->
</style></body>
</html>