网页之奇特的文字变化特效
脚本说明: 2U_BC%`&^uI.z O{第一步:把如下代码加入<body>区域中
<script language="JavaScript">R*y~ m3FWr
function nextSize(i,incMethod,textLength)
{
if (incMethod == 1) return (72*Math.abs( Math.sin(i/(textLength/3.14))) );
if (incMethod == 2) return (255*Math.abs( Math.cos(i/(textLength/3.14))));6|PG ^-Q
};P*ZIv7s$h4U
CA a A@']gA
function sizeCycle(text,method,dis)
{)~"L(tvH I,i~
output = "";%hp8h7Bn
for (i = 0; i < text.length; i++) ?%F f'w%l
{
size = parseInt(nextSize(i +dis,method,text.length));r-I%r2g{Hw,{
output += "<font style='font-size: "+ size +"pt'>" +text.substring(i,i+1)+ "</font>";(s1Q D*i K+bvY
}