<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JS使滚动操作</title>
</head>
<body>
<div id="i1">做任何毫不费力的事情,都是在浪费时间</div>
<script>
function func(){
// 根据ID获取指定标签的内容,定于局部变量接受
var tag = document.getElementById('i1');
// 获取标签内部的内容
var content = tag.innerText;
var f = content.charAt(0);
var l = content.substring(1,content.length);
var new_content = l + f;
tag.innerText = new_content;
}
setInterval('func()', 500);
</script>
</body>
</html>