效果如下:
<html>
<head>
<title>打字效果(wo.wap.sg)</title>
<script language="javascript">
<!--
text = "感情里,总会有分分合合;生命里,总会有来来去去。许多时候,风雨,不是天象而是锤炼;沧桑,不是无奈而是襟怀。以一种洒脱的姿态放手,以一份微笑的心境达观,浅浅的喜欢,静静的爱,淡淡的释怀。";
i = 0;
function type(){
str = text.substr(0,i);
txt.innerHTML = str + "_";
i++;
if (i>text.length)i=0;
setTimeout("type()",300);
}
//-->
</script>
</head>
<body onLoad="type()">
<div id="txt"></div></body>
</html>