語法展示::   http://home.graffiti.net/nfgxhgdzhd/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。


<script language="JavaScript">
<!--
var theText = "歡迎光臨紫蓮の翼   http://blog.pixnet.net/como0925";
function nextSize(i,incMethod,textLength)
{
if (incMethod == 1) return (20*Math.abs( Math.sin(i/(textLength/3.14))) );
if (incMethod == 2) return (155*Math.abs( Math.cos(i/(textLength/3.14))));
}
function sizeCycle(text,method,dis)
{
 output = "";
 for (i = 0; i < text.length; i++)
 {
  size = parseInt(nextSize(i +dis,method,text.length));
  output += "<font style='font-size: "+ size +"pt'>" +text.substring(i,i+1)+ "</font>";
 }
 theDiv.innerHTML = output;
}
function doWave(n)
{  
 sizeCycle(theText,1,n);
 if (n > theText.length) {n=0}
 setTimeout("doWave(" + (n+1) + ")", 50);
}
-->
</script>
<div ID="theDiv" align="center"></div>


var theText = "歡迎光臨紫蓮の翼   http://blog.pixnet.net/como0925"; 中自行修改要顯示的文字
return (20*Math.abs 中修改最小時文字的大小
setTimeout("doWave(" + (n+1) + ")", 50); 中修改顯示特效的速度


將以下程式碼複製,貼在<body >標籤裡面。

 onload="doWave(0)"

arrow
arrow
    全站熱搜

    紫蓮の翼 發表在 痞客邦 留言(1) 人氣()