<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript" src="jquery-1.8.3.js"></script>
<script type="text/javascript">
var arr;
var a=0;
$(document).ready(function(){
var oli=$("#div1").attr('obeatles');
var str = 'jquery打字效果jquery打字效果jquery打字效果jquery打字效果!';
arr = str.split('');
show();
});
function show(){
if(arr!=null){
$('#div1').append(arr[a]);
a=a+1;
}
if(a=40)
{
a=0;
}
window.setTimeout("show()",100);
}
</script>
</head>
<body>
<div id="div1"></div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript" src="jquery-1.8.3.js"></script>
<script type="text/javascript">
var arr;
var a=0;
$(document).ready(function(){
var oli=$("#div1").attr('obeatles');
var str = 'jquery打字效果jquery打字效果jquery打字效果jquery打字效果!';
arr = str.split('');
show();
});
function show(){
if(arr!=null){
$('#div1').append(arr[a]);
a=a+1;
}
if(a=40)
{
a=0;
}
window.setTimeout("show()",100);
}
</script>
</head>
<body>
<div id="div1"></div>
</body>
</html>