<script type="text/javascript" language="javascript">
var i = 0;
var str=" 好好学习 天天向上";
function display(){
var temp = str.substr(i);//从str的i索引开始截取到最后
window.status = temp;
i++;
if(i==str.length){
i=0;
}
}
function startShow(){
window.setInterval("display()",500);
}
</script>
status状态栏实现字符串走动
时间: 2024-10-24 23:47:41