效果图:
状态栏 逐字显示一句话
var i=0;
var iIntervalID=0;
var info="";
var arr=["临","沂","大","学","欢","迎","您","!"];
function interval(){
if(i<arr.length)
{
info=info+arr[i];
window.status=info;
i++;
}else
{
i=0;
info="";
}
}
function showInfo()
{
iIntervalID = window.setInterval("interval()",2000);
}
function cancelInfo(){
window.clearInterval(iIntervalID);
}