一个js实现的字体自动打印的效果

<html>
  <head>
         <title> 诗歌</title>
   <style>
  h3{
    text-align:left;
    color:black;
    font-size:30px;
    text-indent:2em;
    line-height:2em;
    margin:0px;
   }
 .img1{
  float:left;
  width:620;
  border:1px skyblue inset; 
  margin:0px auto;
  padding:0px ;
  }
  .img2{
  float:right;
  width:620;
  border:1px skyblue inset; 
  margin:0px auto;
  padding:0px ;
  }
 
  body{ 
        
         text-align:center;
         background-color:lightblue;
         margin:0px;
          }
   h1{
     color:green;
     font-size:50px;
     font-family:方正舒体;  
   }
   </style>
  </head>
  <body>
       
<SCRIPT language=VBScript>
dim w,t,p,mm,c,mr,dy,tmp,vs:vs=5:dy=1:p=1:mr="<BR><BR><BR>":c="<font color=white><B>|"&mr:Set w = document.body
sub tp
	m=mid(t,p,1):if m="" then c=mr
	if m="`" then m="":mm=mid(mm,1,len(mm)-1)
	if m="<" then av=instr(mid(t,p),">"):m=mid(t,p,av):p=p+av-1
	if m="&" then av=instr(mid(t,p),";"):m=mid(t,p,av):p=p+av-1
	tmp=100:if m="." then tmp=400 else if m="," then tmp=200 else if m=" " then tmp=200
	if w.scrollHeight-w.scrollTop>w.offsetHeight then w.scrollTop=w.scrollTop+int(dy):dy=dy+dy/vs else dy=1
	mm=mm&m:w1.innerHTML=mm&c:p=p+1:if p<=len(t)+1 then SetTimeOut "tp",16+tmp else w.scroll="yes"
end sub
sub     window_onload()
	w.scroll="no"
	w.bgcolor="#A8A8A8"
	w.style.cursor="crosshair"
	'-------------------
	t=w0.innerHTML:tp
end sub


</SCRIPT>
<DIV id=w0  style="DISPLAY: none"> 
        <h1>思秋</h1>  
      
<h3>
秋高气爽的日子
  <pre> 
   一种自我放纵的心境
   
   在落叶与秋风中
   
   徘徊
   
   沉迷于落叶的伤感
   
   消醉于秋风的寒意
   
   于是我
   
   开始思念你
   
   哪怕红叶落尽
   
   哪怕秋风寒寒
   
   只要来年有春天
   
   我把相思高挂枝头
   
   等待
   
   春的萌芽
</pre>
</h3>
</div>   
   <bgsound src="19.mid ">
<DIV id=w1></DIV>

</body>
 </html>


效果如下:

 

 

一个js实现的字体自动打印的效果_第1张图片

 

 

你可能感兴趣的:(一个js实现的字体自动打印的效果)