欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JavaScript實(shí)現(xiàn)打字效果的方法

 更新時(shí)間:2015年07月10日 17:04:45   作者:dworry  
這篇文章主要介紹了JavaScript實(shí)現(xiàn)打字效果的方法,可實(shí)現(xiàn)文字陸續(xù)出現(xiàn)的打字效果,涉及javascript時(shí)間函數(shù)及頁(yè)面元素獲取的相關(guān)技巧,需要的朋友可以參考下

本文實(shí)例講述了JavaScript實(shí)現(xiàn)打字效果的方法。分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:

<input type="button" onclick='start("高考了")' value="start"/>
<input type="text" id="here" />
<script type="text/javascript">
function start(str1)
{
str=str1;
len=str.length;
i=0;
dwrite();
}
function dwrite()
{
  document.getElementById('here').value=document.getElementById('here').value + str.charAt(i);
  if( i++ ==len )
  {
   i=0;
   return true;
  }
  setTimeout('dwrite()',500);
}
</script>

希望本文所述對(duì)大家的javascript程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論