求大哥大姐帮帮忙给下面的代码加个注释,最好注明每句话的意思/

来源:百度知道 编辑:UC知道 时间:2024/06/25 05:04:47
// Sets the id attribute using "object"+i as its value.
beforediv.setAttribute("id","object"+i);

// Creates the text node.
newText=document.createTextNode(defaultString);

// Appends the text node in the new div element.
beforediv.appendChild(newText);

// Appends the new div element in the node object (div id="area").
node.appendChild(beforediv);

// Sets attributes to the next iteration.
fontsize+=2;
posleft+=5;
postop-=(3-((i/20)*2));

}

// Call to start the wave animation effect.
setTimeout("a3danimation()",100);

}

ox=100; // Reference parameter for the initial left position.
oy=100; // Reference parameter for the initial top position.
pi=3.141516*2; // Approximation of the PI value.
ccounter=0; // Animation counter.
ww=10; // P

/ /设置属性使用“对象” +我作为它的价值。
beforediv.setAttribute ( “编号” , “对象” + i )段;

/ /创建的文本节点。
newText = document.createTextNode ( defaultString ) ;

/ /附加文本节点在新的DIV元素。
beforediv.appendChild ( newText ) ;

/ /附加新的DIV元素的节点对象(股利编号= “地区” ) 。
node.appendChild ( beforediv ) ;

/ /设置属性的下一个迭代。
字体大小+ = 2 ;
posleft + = 5 ;
术后- = ( 3 - ( ( i/20 ) * 2 ) ) ;



/ /呼叫启动波动画效果。
setTimeout ( “ a3danimation ( ) ” , 100 ) ;



牛= 100 ; / /参考参数的初始左立场。
公司= 100 ; / /参考指标的初步排名。
圆周率= 3.141516 * 2 ; / /近似的有价证券投资价值。
ccounter = 0 ; / /动画计数器。
湿重= 10 ; / /参数的动画。

功能a3danimation ( ) (
湿重, =. 1 ; / /湿重参数缓慢下降。
ccounter + + ; / /计数器增加1 。

/ /动画拥有350步骤。在结束动画再次启动-看到别人
/ /声明...
/ /
如果( ccounter “ 350 ) (
/ /这个声明改变了立场, 7部地区,包含文字。
(一= 0我“ 7 ,我+ + ) (

/ /计算posx和花束立场基于正弦和余弦函数和
/ /丕, ccounter ,我