日期:2014-05-16 浏览次数:20344 次
<textarea rows="20" cols="100" id="abc"></textarea>
<script type="text/javascript"> $(document).ready(function(){ var test = new Array(); ajaxurl = '__URL__/read' $.ajax({ url: ajaxurl, type: 'POST', dataType:'json', success: function(data) { if(data.status==1){ var phone = data.info.split("\r\n"); test = phone; setTimeout(test123,90); setInterval(scroll1,100); } } }); $k =0; function test123(){ if (($k+1) != test.length){ $('#abc').val($('#abc').val()+test[$k]+"\n"); setTimeout(test123,90); }else{ test = new Array(); $k=0; } $k++; } }) </script>