JS 实现类似打印的效果(一个字一个字显示)
<pre id="aa"></pre>
<div style="display:none" id="w">祝你有诗有歌有远方,有酒有肉有姑娘
</div>
<script language="javascript">
var index=0;
var word=document.getElementById("w").innerHTML;
function type(){
document.getElementById("aa").innerText = word.substring(0,index++);
}
setInterval(type, 500);
</script>