웹마스터 팁
타자를 치면 바로바로 화면에 글이 쑤욱
2002.03.13 07:49
<span style="font-size:10pt;"><STYLE TYPE="TEXT/CSS"></span>
<span style="font-size:10pt;"><!--</span>
<span style="font-size:10pt;">body{</span>
<span style="font-size:10pt;">scrollbar-face-color:white;</span>
<span style="font-size:10pt;">scrollbar-shadow-color: white;</span>
<span style="font-size:10pt;">scrollbar-highlight-color: white;</span>
<span style="font-size:10pt;">scrollbar-3dlight-color:white;</span>
<span style="font-size:10pt;">scrollbar-darkshadow-color: black;</span>
<span style="font-size:10pt;">scrollbar-track-color: white;</span>
<span style="font-size:10pt;">scrollbar-arrow-color: white;</span>
<span style="font-size:10pt;">}</span>
<span style="font-size:10pt;">--></span>
<span style="font-size:10pt;"></STYLE><form name="form1"></span>
<span style="font-size:10pt;"> <span
style="font-size:10pt;"><textarea name="tag" rows="15"
cols="74" style="color:white; background-color:black; border-color:black;
border-style:solid;"><HTML>
<span style="font-size:10pt;"><HEAD></span>
<span style="font-size:10pt;"><SCRIPT></span>
<span style="font-size:10pt;">var numLeft=10</span>
<span style="font-size:10pt;">var numTop=10</span>
<span style="font-size:10pt;"></span>
<span style="font-size:10pt;">function load(){</span>
<span style="font-size:10pt;">if(event.keyCode==13){</span>
<span style="font-size:10pt;">numTop+=20</span>
<span style="font-size:10pt;">numLeft=-5</span>
<span style="font-size:10pt;">obj=document.all["text"]</span>
<span style="font-size:10pt;">obj[obj.length-1].innerHTML=" "
<span style="font-size:10pt;">}</span>
<span style="font-size:10pt;">else{</span>
<span style="font-size:10pt;">numLeft+=15</span>
<span style="font-size:10pt;">source=box.innerHTML</span>
<span style="font-size:10pt;">source=source+"<span id='text' style='position:absolute;top:"+numTop+";left:"+numLeft+";font-size:100;font-weight:bold;'></span>"</span>
<span style="font-size:10pt;">box.innerHTML=source</span>
<span style="font-size:10pt;">obj=document.all["text"]</span>
<span style="font-size:10pt;">chr=""+event.keyCode</span>
<span style="font-size:10pt;">for(j=0;j<obj.length;j++){</span>
<span style="font-size:10pt;">if(obj[j].innerHTML==""){</span>
<span style="font-size:10pt;">typing(99,j,chr);</span>
<span style="font-size:10pt;">break;</span>
<span style="font-size:10pt;">}</span>
<span style="font-size:10pt;">}</span>
<span style="font-size:10pt;">}</span>
<span style="font-size:10pt;">}</span>
<span style="font-size:10pt;"></span>
<span style="font-size:10pt;">function typing(b,i,c){</span>
<span style="font-size:10pt;">obj=document.all["text"]</span>
<span style="font-size:10pt;">if(b>15){obj[i].innerHTML="
<span style="font-size:10pt;">b=b-1</span>
<span style="font-size:10pt;">setTimeout('typing('+b+','+i+',"'+c+'")',10)</span>
<span style="font-size:10pt;">}</span>
<span style="font-size:10pt;">}</span>
<span style="font-size:10pt;"></SCRIPT></span>
<span style="font-size:10pt;"></HEAD></span>
<span style="font-size:10pt;"><BODY onkeypress=load() id="box"></span>
<span style="font-size:10pt;"><span id="text" style="position:absolute;top:10;left:10;font-size:100;font-weight:bold;"></span></span>
<span style="font-size:10pt;">